Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-07-2004, 02:03 PM   #1
LQ Newbie
Registered: Oct 2004
Posts: 4

Rep: Reputation: 0
trying to compile untared codes

Hello, I'm new on Linux. I'm using Mandrake 10.1 and need to compile different programs...
Everywere people say me to untar, and then type "./configure" "make" "make install"... Well, when I try to do configure is that waht I receive:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking for C++ compiler default output... configure: error: C++ compiler cannot create executables
See `config.log' for more details.

I've read some newbies messages like this where the people reply sayng that gcc is broken or not installed... Well when I type gcc -v it says that:Reading specs from /usr/lib/gcc/i586-mandrake-linux-gnu/3.4.1/specs
Configured with: ../configure --prefix=/usr --libdir=/usr/lib --with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --enable-long-long --enable-__cxa_atexit --enable-clocale=gnu --disable-libunwind-exceptions --enable-languages=c,c++,ada,f77,objc,java --host=i586-mandrake-linux-gnu --with-system-zlib
Thread model: posix
gcc version 3.4.1 (Mandrakelinux (Alpha 3.4.1-3mdk)

Please, if you have any idea about what is this problem, reply having in mind that I'm really new on this thing. If I need to reinstall gcc, please, tell me how.

Thank anyone,

PS: I had the same problem when I tried to use SuSE 9.1, it had said the same thing...

Old 10-07-2004, 02:13 PM   #2
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
Looks like the program you're trying to compile needs a C++, ie g++, compiler vs C compiler, ie gcc. What is your output for g++ -v? If it's not installed, then you'll need to install it. Easiest way would probably be through Mandrake's package utility.

If you determine that it is indeed installed, test it by compiling this basic code.

Place the following in a file and named in hello.cpp:
#include <iostream>

int main (void)
  std::cout << "Hello, you're C++ compiler works fine." << std::endl;
  return (0);
Then compile it with the following command:
g++ -Wall hello.cpp -o hello_cpp
And execute it, ie ./hello_cpp.

You can test you're C compiler the same way.

Place this code in a file named hello.c:
#include <stdio.h>

int main (void)
  printf("Hello, You're C compiler works fine.\n");
  return (0);
Compile it:
gcc -Wall hello.c -o hello_c
And execute it with a ./hello.c.

Last edited by DaHammer; 10-07-2004 at 02:28 PM.
Old 10-07-2004, 02:19 PM   #3
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911
This is asked and answered quite frequently,
have a search

Old 10-07-2004, 02:38 PM   #4
LQ Newbie
Registered: Oct 2004
Posts: 4

Original Poster
Rep: Reputation: 0
ok Hammer, I feel not good...
That's it: I don't have the g++....
But Mandrake doesn't has it too... I mean, the package manager doesn't find it and the update tool doesn't work... There is a rpm installer anywhere? How could I install this g++ without Mandrake helps?

Old 10-07-2004, 05:24 PM   #5
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
Never did like Mandrake's package manager much, but it should be there as it's included with the main set of packages. I haven't used Mandrake in years so I won't be of much help with specific's on using the package manger deal. But you can grab the package you need off a mirror, like this one:

There are other gcc packages as well like gcc-cpp-3.4.1-3mdk.i586.rpm and etc that you may want/need. Generally with gcc, you have a package for the core compiler and then each lanuage like C++ are added separately if needed. But I'm not sure how Mandrake lays it out so there may be some dependancies (another reason I dislike package mangers in general, dependancy hell) you'll need to add as well.

Last edited by DaHammer; 10-07-2004 at 05:29 PM.
Old 10-07-2004, 09:09 PM   #6
LQ Newbie
Registered: Oct 2004
Posts: 4

Original Poster
Rep: Reputation: 0
thank you very much... now it is working..
I'm having some problems with curl but the c and c++ is working very well.
Curl I'll se on next days,
Really, thank you...


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Are the hex codes for colors in a jpg the same codes as used in html? abefroman Linux - Security 3 07-31-2005 03:21 PM
Cannot compile LDD example codes... okeyla Linux - Hardware 0 05-03-2005 08:30 PM
How to compile and run C codes in Fedora Core? hoper Programming 1 11-03-2004 01:53 PM
Bash script (untar *.tar files and then cd to the untared dir) k0ljat Linux - Newbie 2 12-30-2003 05:57 AM
untared executable files don't work jlb Linux - Newbie 2 06-11-2002 06:44 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:47 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration