PDA

View Full Version : gcc doesn't work?



gufide
May 29th, 2011, 11:12 PM
when I try to build my project, I got:

checking for g++... g++
checking whether the C++ compiler works... no
configure: error: in `/home/master/prog/test_opengl/Debug':
configure: error: C++ compiler cannot create executables

I'm in anjuta IDE, I got build essentials installed, and gcc too...

muteXe
May 29th, 2011, 11:18 PM
It's looking for g++?

Zugzwang
May 30th, 2011, 10:34 AM
The golden rule of using an IDE (at least, when using Linux): when having problem, try to see if things work when not using the IDE.

1. Try to get a more meaningful error message. Try out (in some subdirectory of /home/master/prog/ to be sure) what is written in this post (http://ubuntuforums.org/showpost.php?p=10856183&postcount=16). Does it work? If not, copy & paste the exact error message here.

2. One possibility for your error message is that you are trying to compile in a directory that is mounted in a way such that the executable bit of a file cannot be set. One example is working on a FAT/NTFS formatted disk, which do not have this bit.

MadCow108
May 30th, 2011, 11:48 AM
look in the config.log for the error message.

SeijiSensei
May 30th, 2011, 01:31 PM
Permissions problem in the target directory perhaps?

Petrolea
May 30th, 2011, 01:53 PM
when I try to build my project, I got:

checking for g++... g++
checking whether the C++ compiler works... no
configure: error: in `/home/master/prog/test_opengl/Debug':
configure: error: C++ compiler cannot create executables

I'm in anjuta IDE, I got build essentials installed, and gcc too...

Try manually and see if error still occurs. If it doesn't work, check whether the final directory is protected from writing.
If nothing works with g++ in any directory (not even a simplest Hello World program) that means it could be a g++ problem.

gufide
May 30th, 2011, 10:29 PM
The configure file work only on terminal, and the error don’t occur on the terminal only. No idea?

MadCow108
May 30th, 2011, 11:51 PM
yes, look in the config.log and see what the real error is.
before you post that its mostly guessing.

Zugzwang
May 31st, 2011, 08:59 AM
The configure file work only on terminal, and the error don’t occur on the terminal only. No idea?

Huh? There were three posts containing helpful ideas in this thread. Why don't you see if any of them helps?