Author Topic: g++ not found  (Read 11393 times)

Offline AlexisSorbas

  • Single posting newcomer
  • *
  • Posts: 8
  • alien
g++ not found
« on: July 09, 2009, 07:53:29 pm »
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

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: g++ not found
« Reply #1 on: July 09, 2009, 08:01:37 pm »
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).

Offline AlexisSorbas

  • Single posting newcomer
  • *
  • Posts: 8
  • alien
Re: g++ not found
« Reply #2 on: July 09, 2009, 09:09:39 pm »
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