Code::Blocks Forums
User forums => Help => Topic started by: milarze on May 22, 2011, 12:39:08 pm
-
Hello all! This is my first post here.
I have a problem with compiling programs i write in cb. It has to do with the settings i believe. When i try to compile the sample program, i get the message:
"etc - Debug" uses an invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]. Probably the toolchain path within the compiler options is not setup correctly?! Skipping...
Nothing to be done.
So I went to the toolchain executables panel in the compiler and debugger settings. I am using the GNU GCC Compiler. Can anyone tell me what the settings should be? As in what the C compiler, C++ compiler, linkers, debuggers, resource compiler, and make program should be? Names of the programs? I think I am using gcc 4.2 version, but I dont really know how to check that. :?
Thanks!
-
Type "gcc --version" and "g++ --version" in a terminal.
The defaults should be OK on all linuxes, so you do not need to do any changes.
Just check if the compiler/debugger is installed.
-
Type "gcc --version" and "g++ --version" in a terminal.
The defaults should be OK on all linuxes, so you do not need to do any changes.
Just check if the compiler/debugger is installed.
And check whether it's in /usr/bin or in (e.g.) /usr/local/bin.
In the second case, you have to fix the "Compiler's installation directory" accordingly.
-
I have these settings now:
C Compiler: gcc4.2
C++ Compiler: g++4.2
Linker for dynamic libs: ld
Linker for static libs: ld
Debugger: gdb
Resource compiler: gdb
Make program: make
I have gcc4.2 installed, and the executable file for that is in ¨/usr/bin¨ as are all the others: ld, gdb, g++4.2, and make. Does invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] in the error message mean that I am using a compiler that cannot be used in my version of linux?
Thanks!
-
Are you sure the executable is called gcc4.2 and not gcc-4.2 ?
You can use the little button at the right of the textbox to chose the executable to be sure.
-
yes, i used the little box at the side of the text box to find the files. it was in the directory /usr/bin. it also had the symbol for an executable file. but now i think the problem is actually with my compiler, because when i try compiling in command line, i am told the the command g++ does not exist. but i suppose this is not a cb problem, so i'll have to ask it elsewhere.
thanks!
-
Do you have g++ installed ?
On many linux distros it is in an own package and will not be installed automatically together with the c-compiler.
-
i do have the g++4.2 file in the /usr/bin directory, and the package gcc4.2-c++ is shown as installed in my software management. so i do believe i have it installed.
-
Verify the project is using the correct compiler.
Tim S.
-
Verify the project is using the correct compiler.
Tim S.
Do the same for the targets (they can use different compilers).