Using cmake on windows for c++

You were almost there with Visual Studio. Select Visual Studio as target. Open the generated project in Visual Studio, build it. (just like you alread did). Then, instead of trying to run BUILD_ALL, run a real project that creates an executable, it should also be in that list. Just right click it and 'play' it.

If you still get errors, post them in detail including what you did before the error. Note: a carefully configured cross platform CMake project (aka the CMakeLists.txt) should not require any fiddling with VC++ directories. It should work automagically, especially with well known libs such as SDL.


if you run cmake by command:

cmake -G "Visual Studio 14 Win64" path\to\source\dir

you need to run this command to continue(in Visual Studio Command Prompt):

msbuild Project.sln

either if you run cmake:

cmake -G "NMake Makefiles" path\to\source\dir

you need to run this cmd to continue(in Visual Studio Command Prompt):

nmake

Tags:

C++

Cmake