When you try to use a compiler variable whose values contain spaces in the compiler’s installation directory area on the toolchain executables page of the compiler settings dialog, the resulting commands for the compiler, resource compiler, and linker will fail to execute.
For example, if I have
then the command codeblocks will try to execute to compile a file is
"C:\Program Files\Microsoft Visual Studio 2017\VC\Tools\MSVC"\14.13.26128\bin\Hostx64\x64\cl.exe
Because that command is partially quoted and partially unquoted, windows does not recognize it as a valid command. Codeblocks gives the following error message:
Project/Target: "test - Debug":
The compiler's setup (Microsoft Visual C++ 2017) 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->Microsoft Visual C++ 2017->Toolchain executables" and fix the compiler's setup.Tried to run compiler executable '"C:\Program Files\Microsoft Visual Studio 2017\VC\Tools\MSVC"\14.13.26128\bin\Hostx64\x64/bin/cl.exe', but failed!
Skipping...
Ok, in the forum i was thinking this is a replace macro bug, but now i am not sure anymore...
are you using the variable with the " " ?
You should not use them before the replacing...
If you want to use qutation you have to use them outside the macro name... There is no logic to fix quatation in macros, because this was not the only intetion for macros...
So in your example
spaces ?should? not be a problem here...
can you try it?
You're right, taking out the quotes in the variable definitions does work. However when you try to enter a variable with spaces, a warning dialog pops up asking:
I guess that made me think those variables should be quoted and I never tried it without quoting them. Sorry about that.
So this ticket is invalid and can be closed. The other ticket about the incorrect warning at start up still applies though.