Author Topic: invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] Error  (Read 9631 times)

Offline jacksunny

  • Single posting newcomer
  • *
  • Posts: 6
I continue to get the following error message:

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

Because of this I cannot use C::B for anything. I tried searching Google and went through pages of results. I watched a YouTube video on how to set it up but nothing will work
I am running C::B 10.05. Please help!!! Thanks

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Did you search the forums?
Did you install a compiler at all?
Did you do verify what the error message tells:
Probably the toolchain path within the compiler options is not setup correctly?!
???
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline jacksunny

  • Single posting newcomer
  • *
  • Posts: 6
Yes, Yes and Yes. That's what I don't understand. On other forum posts people ask the same question and they are told something like: Make sure the compilers installation directory is set to C:\CodeBlocks\MinGW or something similar and it works for everyone else, just not for me.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Yes, Yes and Yes. That's what I don't understand. On other forum posts people ask the same question and they are told something like: Make sure the compilers installation directory is set to C:\CodeBlocks\MinGW or something similar and it works for everyone else, just not for me.
Ok, some questions:
- what platform? (Windows?!)
- where did you install Code::Blocks into?
- what setup did you choose (the one bundled with compiler or without)
- where is your GCC (MinGW) compiler installed?
- where do you find the following executables:
  - mingw32-c++.exe
  - mingw32-g++.exe
  - mingw32-gcc.exe
- what did you setup in the global compiler options?
  - what tool chain path's exactly?
  - what names for the executables exactly?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline jacksunny

  • Single posting newcomer
  • *
  • Posts: 6
I am running Windows 7 64-Bit with Service Pack 1 Installed

Code::Blocks is installed into my C: drive (The YouTube video I watched said I should install it in there and not in the "Program Files" folder )
I chose the one bundled with the compiler.

The GCC Compiler is in the folder C:\CodeBlocks. I also downloaded the GCC Compiler separate and put it in C:\MinGW 

Those executables are all in C:\CodeBlocks\MinGW\bin

The tool chain's exact path is C:\CodeBlocks\MinGW

The names for the executables are:
C Compiler - mingw32-gcc.exe
C++ Compiler - mingw32-g++.exe
Linker for Dynamic Libs - mingw32-g++.exe
Linker for static Libs - ar.exe
Debugger - gdb.exe
Resource Compiler - windres.exe
Make Program - make.exe
Thank you very much for your help.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Do the executables really exist in C:\CodeBlocks\MinGW\bin ?

If you have a MinGW installation in any \MinGW-folder on any drive, it can interfere with other MinGW installations.
Either (re-)move it or use this installation.
That's not the cause for your problem, it only affects you, if you compile and/or link.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Did I miss the version of Code::Blocks installed?
If it was 8.02 or before the Compiler would not work on Windows 7.
Oops, he said 10.05 in first post.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
The GCC Compiler is in the folder C:\CodeBlocks. I also downloaded the GCC Compiler separate and put it in C:\MinGW
Those executables are all in C:\CodeBlocks\MinGW\bin
Well - it seems you have two compilers installed or one of these folders is empty. Most likely the folder C:\CodeBlocks\MinGW\bin is empty. This would explain the message in C::B.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline jacksunny

  • Single posting newcomer
  • *
  • Posts: 6
Do the executables really exist in C:\CodeBlocks\MinGW\bin ?
Yes, I am positive. I checked several times.

If you have a MinGW installation in any \MinGW-folder on any drive, it can interfere with other MinGW installations.
Either (re-)move it or use this installation.
That's not the cause for your problem, it only affects you, if you compile and/or link.
I removed the the other MinGW folder located in the C: drive. I have 2 because one of the solutions to this problem(according to a different forum) was to download the compiler separately and put it in the C: drive which didn't work.

Well - it seems you have two compilers installed or one of these folders is empty. Most likely the folder C:\CodeBlocks\MinGW\bin is empty. This would explain the message in C::B.
No, that folder is not empty.
« Last Edit: April 03, 2011, 12:03:21 am by jacksunny »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Ok, assuming you've removed the C:\MinGW folder completely, do the following on a command prompt:

C:
cd \CodeBlocks\MinGW
dir /B /S > files_cb.log

Then attach this file (files_cb.log) and your default.conf file (C::B's configuration) as well as a tiny test project where this happens as a zipped file to this post.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline jacksunny

  • Single posting newcomer
  • *
  • Posts: 6
I have attatched the files you asked for. Thanks again for your help.
« Last Edit: April 03, 2011, 03:34:24 pm by jacksunny »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
You use icc (Intel-compiler) as compiler for your project.
Switch the compiler to gcc in the build options and it should work.

Offline jacksunny

  • Single posting newcomer
  • *
  • Posts: 6
Oh wow I'm sure I selected the gcc compiler, what a dumb mistake. Thanks

AbdulE

  • Guest
Thanks alot, this helped me too!