User forums > Help
The compiler's setup is invalid (newbie).
(1/1)
miauniverse:
Hello!
Thank you for taking the time to read this. I'm a complete newbie and I really appreciate any help/knowledge you can give me. I've been working on issues with Codeblocks for the past two days, and I am desperate for it to work. I am currently having a problem where Codeblocks cannot find my GNU GCC compiler.
I am using:
- Mac OS X El Capitan 10.11
- CodeBlocks for Mac 13.2
- GNU GCC compiler for Mac 5.2.0 and command line tools from Xcode
My build log says this when I try to execute the default "Hello World" program:
--- Quote ---"pleasework - Debug": The compiler's setup (GNU GCC Compiler) is invalid, so Code::Blocks cannot find/run the compiler.
Probably the toolchain path within the compiler options is not setup correctly?! (Do you have a compiler installed?)
Goto "Settings->Compiler...->Global compiler settings->GNU GCC Compiler->Toolchain executables" and fix the compiler's setup.
Skipping...
Nothing to be done (all items are up-to-date).
--- End quote ---
When I exit Settings, I always get this error message (even though "compiler" is ticked in the Batch Builds setting):
--- Quote ---"The compiler plugin must always be loaded for batch builds! Automatically re-enabled."
--- End quote ---
After searching forums, I tried these things:
- I went to Settings -> Compiler -> Global Compiler Settings and selected GNU GCC Compiler. I set it to default and I reset the defaults.
- I went to Settings -> Compiler-> Global Compiler->Toolchain Executables and hit auto-detect. It says the path is "/usr".
- I uninstalled and then reinstalled Codeblocks, the compiler and the command line tools.
Thank you for your time!
oBFusCATed:
Obviously C::B cannot execute your compiler's executable.
The steps are always something like this:
1. open a terminal or file browser
2. find where is your compiler's path and what are the executable names for the c compiler, c++ compiler and linker.
3. go to the toolchain settings and select the compiler you want to use or make a copy
4. set the proper paths and executable names
5. make sure your target and projects use the modified compiler
The auto detect button works only for a default compiler, not for custom ones!
miauniverse:
--- Quote from: oBFusCATed on October 12, 2015, 12:21:53 am ---Obviously C::B cannot execute your compiler's executable.
The steps are always something like this:
1. open a terminal or file browser
2. find where is your compiler's path and what are the executable names for the c compiler, c++ compiler and linker.
3. go to the toolchain settings and select the compiler you want to use or make a copy
4. set the proper paths and executable names
5. make sure your target and projects use the modified compiler
The auto detect button works only for a default compiler, not for custom ones!
--- End quote ---
Thank you so much for taking the time to reply! I have a few questions, if you don't mind.
Would you mind telling me how to find out the compiler's path and the executable names? I also am not sure how to make sure that my target and projects use the modified compiler.
oBFusCATed:
--- Quote from: miauniverse on October 12, 2015, 12:39:03 am ---Would you mind telling me how to find out the compiler's path and the executable names?
--- End quote ---
No idea how this is done on OSX.
Read the help for you package you've installed.
Generally the autodetect should detect your gcc/g++ executables that are in /usr/bin.
But you have to test them if they work.
--- Quote from: miauniverse on October 12, 2015, 12:39:03 am ---I also am not sure how to make sure that my target and projects use the modified compiler.
--- End quote ---
Inspect Project->Build options
Navigation
[0] Message Index
Go to full version