Fresh checkout of SVN + CMake + MSVC2005 = wrong libs used

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Post Reply
Posts: 0
Joined: Sun Nov 04, 2007 8:56 am

Fresh checkout of SVN + CMake + MSVC2005 = wrong libs used

Post by Stukfruit » Sun Nov 04, 2007 9:16 am


I usually used to use scons to build Blender from SVN and use the command line to actually build Blender. That was all fine and works great.

Now when I wanted to build Blender using the MSVC2005 IDE instead of the CLI method I tried the project file generation feature of the included CMake files, because using Scons with the IDE is not.. well, nice (it's much slower because it replaces the build system, removes intellisense, etc).

The CMake generated project files are all right and the build went well, but the final Blender executable couldn't be made because there were 60 linker errors, all of which were about std::string.

I searched, and I searched, until I came along the OpenEXR library. I looked into the library directory, and blimey! there were actually two different versions of the OpenEXR libraries, where one of them was specifically meant for MSVC2005, and the rest for older versions.

In short, the CMake generated project files for MSVC2005 do not fully work out of the box because the OPENEXR_LIBPATH is set to use the libraries from libs/windows/openexr/lib_msvc instead of libs/windows/openexr/lib_vs2005, which results in the linker errors from above.

Switching the following code in $blenderroot/CMakeLists.txt:
Makes it work all happily again :)

Posts: 0
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Post by stiv » Mon Nov 05, 2007 6:13 pm

Fixed in a commit today.

Post Reply