Sorry for resurrecting this thread, but doing a forums search on the current error message "The compiler's setup is invalid so Code::Blocks cannot find/run the compiler. Probably the toolchain path within the compiler options is not setup correctly?! Skipping..." does _not_ find anything, and when searching for "compiler invalid" this thread is the top one with most "relevance" factor.Based on the Times I helped users on this issue the three top causes are
1. User does not have an compiler installed.
Visual Studio 2008 with C/C++ and Service Pack 1 is installed on this machine.2. C::B is not configured right to use the installed compiler.
Neither the Visual Studio's VC nor the VC/bin directory seems to be right. Debugging tools and SDK are set as additional paths.
When opening cmd the command cl.exe provides:P:\Codeblocks>cl.exe
Microsoft (R) 32-Bit C/C++-Optimierungscompiler Version 15.00.30729.01 für 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
Syntax: cl [ Option... ] Dateiname... [ /link Linkeroption... ]
So path and environment are correctly set.3. The user did NOT install the Compiler Correctly; example missing part of the MinGW installation
Visual Studio 2008 is working fine. Including nmake.exe, cdb.exe, link.exe and cl.exe from the command line.
I have tried deleting the default.conf file and restarting C::B with a new config. Autodetect works fine, setting all paths and toolchain executables by itself. But unfortunately that's all.
I was completely stuck here, because the message appears immediately when trying to compile. I had an issue with a folder not set in the path environment variable, so a .dll could not be found when trying to start cl.exe. But this issue is fixed.
How can I be sure that Code::Blocks _really_ tries to execute cl.exe in the specified path? And if it does why isn't there a message stating what went wrong?
My settings:
Compiler's installation directory: P:\VStudio2008\VC
C++ compiler: cl.exeP:\VStudio2008\VC>dir /B bin\*.exe
bscmake.exe
cl.exe
cvtres.exe
dumpbin.exe
editbin.exe
lib.exe
link.exe
ml.exe
nmake.exe
pgocvt.exe
pgomgr.exe
pgosweep.exe
undname.exe
xdcmake.exe
So what is the solution here?
The solution is, that although Code::Blocks is correctly configured, the project is a cross-platform project copied from a linux machine.
If all your settings are correct, you might want to make sure, that the Build Options of your project show the same compiler used you set up. ;)
Cheers
P.S.: Edith fixed some typos, but probably not all...