Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: inc7 on February 14, 2012, 09:06:49 pm

Title: Compilation Fails
Post by: inc7 on February 14, 2012, 09:06:49 pm
With the newest version of CB, I created a new C++ console application project. While the project is building, I get the following error message in the build log:

Quote
-------------- Build: Debug in test ---------------

Execution of 'cl.exe /nologo /W3 /EHsc  /Zi /D_DEBUG /MTd    /I"C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include" /I"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include"  /c main.cpp /Foobj\Debug\main.obj' in 'C:\Users\Daniel\Desktop\cpp\cpp1\test' failed.
Nothing to be done.

The path in the log is wrong, because on my machine, cl.exe is located at C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin. So the reason why it won’t work is that the path is wrong. Where can I change the compilers path? In addition to this problem, the Debugger also doesn’t work. It seems like that there is something wrong with the environment variables.
Title: Re: Compilation Fails
Post by: oBFusCATed on February 14, 2012, 10:22:12 pm
If you're a beginner programmer a better option is to install a gcc build for windows (mingw, tdm, etc) and use it instead of vc.

Also if you want to stick to vc10, you need (as far as I know) one of the latest nightlies. Older version have problem with it.

To answer your question Settings -> Compiler -> [your compiler] -> Toolchain executables