configure: error: C++ compiler cannot create executables
Linux - NewbieThis 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!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
configure: error: C++ compiler cannot create executables
i tried to compile aMule with my debian, but i get this problem,
i'm a noob and i just install my debian so there is not a lot of stuffs on it so maybe i need something else, but i dont know what
Thks for help.
Code:
dicou@debian:~/tmp/aMule-2.0.3$ ./configure
checking build system type... i686-pc-linuxlibc1
checking host system type... i686-pc-linuxlibc1
checking target system type... i686-pc-linuxlibc1
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... no
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 file name... configure: error: C++ comp
iler cannot create executables
See `config.log' for more details.
You don't have a C++ compiler on there. You need to install the gcc-c++ package (while you're at it, install gcc as well if you haven't already). This can probably be done with apt-get, but I'm not sure how you use it.
this can be caused by many problems, as this error is probably meaning that output executable target file cannot be created for some reason.
In my case right now it was caused by wrong compiler parameter.
I use KDevelop for unix (c++ dev tool).
After output "see config.log" I went to look at it; I missed the correct one, as there was one in project directory, which is not the correct one; correct one for me was in /debug/ subdirectory, because I was building Debug target.
inside I searched for the error message, "cannot create executables" and I saw that I was compiling my program with command:
gcc -o target _UNIX -D _UNIX ... something more
problem in my case was the first "_UNIX", which is invalid parameter for compiler. I realized that I have entered it incorrectly into Linker flags in KDevelopment project options. After I removed it everything compiled allright. (second, -D _UNIX is correct, as it specifies something like #define _UNIX for compiler)
So I suggest to see the config.log for your project and find the problem inside it. It can take some time.
mirex, if you look at the output of the configure script:
Quote:
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
Hi
sorry for gravedigging, but this was first hit on google when I was looking for "compiler cannot create executables" problem. So I thought that it could help also others, who are looking for solution to this problem.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.