NOTE: This was done from inside the “Visual Studio Development Console 2010”, which is basically the windows command prompt only with some extra local environment variables set up.[/code]
The first error I got was the following:
I edited CMakeLists.txt in the Urho3D root directory to disable precompiled headers and retried. Everything went fine until this next error popped up:
Does anyone know what’s going on?
The library compiles fine on my linux machine using gcc 4.6.3
[EDIT] When running nmake again after the last error, I get the following, different error message:
Is there a specific reason you want to use version 1.23? I would actually recommend just using master (or at least 1.3) for more features and fixes.
I don’t think out-of-source build, or using Urho as an external library is supported in 1.23 version yet, so you have to use the provided cmake_vs2010.bat file, which will setup an in-source build.
I tried compiling master, and the first issue with precompiled headers did not show up anymore. I am still getting the second error though.
Interestingly, if I generate Visual Studio solution files and compile it through the IDE, it successfully compiles everything, where as if I try to use nmake, it hangs at the second error.
I need to use nmake because I’m setting up a continuous integration server and the build process needs to be instantiated from the command line.
I also have a question regarding static/dynamic configurations: If I specify -DCMAKE_BUILD_TYPE=Debug and -DURHO3D_LIB_TYPE=Shared, this should build the debug version of a shared lib version, right?
I have not tested “NMake Makefiles” generator at all, it’s possible there’s a bug either in our CMake script, or in the generator, in relation to precompiled headers.
I suggest that you use the “Visual Studio 10” generator like you would if compiling manually with VS, but then invoke MSBuild to build the Urho solution automatically. The VS generator includes both debug & release configs into the solution file, but you can choose the config when running MSBuild, eg.