Author Topic: The compiler's setup is invalid (newbie).  (Read 7805 times)

Offline miauniverse

  • Single posting newcomer
  • *
  • Posts: 4
The compiler's setup is invalid (newbie).
« on: October 11, 2015, 11:57:16 pm »
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).

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."

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!
« Last Edit: October 12, 2015, 12:07:36 am by miauniverse »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: The compiler's setup is invalid (newbie).
« Reply #1 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!
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline miauniverse

  • Single posting newcomer
  • *
  • Posts: 4
Re: The compiler's setup is invalid (newbie).
« Reply #2 on: October 12, 2015, 12:39:03 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!

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.


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: The compiler's setup is invalid (newbie).
« Reply #3 on: October 12, 2015, 01:45:45 am »
Would you mind telling me how to find out the compiler's path and the executable names?
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.

I also am not sure how to make sure that my target and projects use the modified compiler.
Inspect Project->Build options
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]