User forums > Help

How to force CB to point to the right compiler

(1/2) > >>

zorglub!:
Hi guys

I have a strange CB behaviour...
I'm trying to compile a piece oc C code...( source file is xxxx.c)
I have, by default, Gcc as default compiler..
So far, so good but when I launch CB, I'm getting an error 127 and a g++ not found message !!!

g++ to compile C stuff...!!!  should have been gcc instead

Something must be pointing to the wrong compiler and i'd like to know where to change it
Thks in advance

Jenna:
Are you sure this happens at compile-time and not in linking stage ?

g++ is used as default linker in the standard-toolchain.

To see exactly what happens, you can turn on full commandline logging:
Change "Settings -> Compiler and debugger... -> Global compiler settings -> [the compiler you use] -> Other settings(rightmost tab)" "Compiler logging" to "Full commandline".

deadneurons:
there is a, not very obvious arrow buttons  ' <    > ' on the left and right side of the compiler settings.
tick on the > until you see the Toolchain executables tab.

zorglub!:
Hi guys

Aaaaaaargh  !!!
The solution was, just to make CB happy, to urpmi gcc-c++..;
Once g++ is installed, then gcc is found ...
U need to install the g++ stuff, even if you don't use it, to gain access to the  compiler that u use.. pretty weird  no !!

Jenna:
As I wrote before, g++ is used as frontend to the linker and C::B always splits the build process in compiling and linking, so it can not work without it.

If you don't do anything but c-compiling and you absolutely don't want to install g++, you can use gcc for linking stage.
gcc can link c-files, but not c++-files, g++ can link both of them.

Navigation

[0] Message Index

[#] Next page

Go to full version