Search code examples
c++visual-studio-2010visual-studio-2012upgradeproject-setup

Linker error after upgrading solution to VS2012


I was developing a project that uses (among others) boost::filesystem under VS2010. Today I decided to switch to VS2012, upgraded the solution (just let the VS do it automatically) and when I tried to compile it seems all went fine except for 1 thing:

fatal error LNK1104: cannot open file 'libboost_filesystem-vc100-mt-gd-1_53.lib'

I keep boost in a separate folder (outside the project location), the paths seems to be correct (I have precompiled *.lib files of boost, both for VS2010 and VS2012). The error suggests the project looks for the old versions of libs (vc100 instead of vc110) but I have no idea how to change that.


Solution

  • Make sure the Platform Toolset option is set to v110. Right click on the project name and select Properties. Then under Configuration Properties -> General -> Platform Toolset select Visual Studio 2012 (v110).