News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

g++ not found

Started by AlexisSorbas, July 09, 2009, 07:53:29 PM

Previous topic - Next topic

AlexisSorbas

Hi,

I got the error:
g++: not found
Process terminated with status 127 (0 minutes, 0 seconds)

I am not so familiar in Linux programming and I now use codeblocks in Fedora 11 which has by default installed GCC but not G++.
Since I currently try to build just a C application (I have selected: C console application) and not a C++ application I wonder why the hell codeblocks wants to use G++ instead of GCC.
Is there a way how to tell codeblocks to use GCC instead of G++?

Thanks
Alex
The difference between genius and stupidity is that genius has its limits. - Albert Einstein

Jenna

C::B uses g++ for linking, you can chose this in "Settings -> Compiler and debugger... -> GNU GCC compiler -> Toolchain executables -> Linker for dynamic libs".
If you set this to gcc it will work for c-programs, but break c++ builds.

I recommend to install the g++ package also and not to change the linker-command, because it will trigger an error, if you later on want to create c++ programs.

The package is called something like gcc-c++ if I remember correctly (not using fedora).

AlexisSorbas

Jens,

this was the right way! Thank you very much!

Regards,
Alex
The difference between genius and stupidity is that genius has its limits. - Albert Einstein