visual c++ - How to build OpenImageIO 1.4.12 with VS2015 -
i trying build dependencies project, based on vs2013, vs2015.
of them building without problems, either or patch, totally @ loss openimageio 1.4.12.
passing parameters cmake , msbuild set use of vs2015 everything, , indeed generated solution files indicate "vc140_xp" chosen toolset.
@ link time receive error one, indicating somewhere there reference boost libraries built vs2013:
link : fatal error lnk1104: cannot open file 'libboost_thread-vc120-mt-1_56.lib' [f:\...\deps\x64\oiio-release-1.4.12\build\src\libopenimageio\openimageio.vcxproj]
of course have bunch of libboost_xxx-vc140-mt-1_56.lib in place, since i've built them vs2015. dependencies set in solution file correctly refer libboost_xxx-vc140-mt-1_56.lib files , correct path, , doing findstr in openimageio build tree i'm not able find reference older vs version.
same command lists lot of .obj files containing references, such (put on multiple lines better readability):
build\src\libopenimageio\openimageio.dir\release\xmp.obj:/failifmismatch:"_crt_stdio_iso_wide_specifiers=0" libboost_regex-vc120-mt-1_56.lib libboost_thread-vc120-mt-1_56.lib libboost_date_time-vc120-mt-1_56.lib libboost_system-vc120-mt-1_56.lib libboost_chrono-vc120-mt-1_56.lib
is because of these references link fails looking different versions of boost libs? can these references come from? , how can rid of them, since apparently found in configuration?
this problem in boost itself, not in openimageio, , caused used version of boost being released before vs2015.
as pointed out kenba in comment, answer points solution: visual studio 2013 (vs120) asks wrong boost libraries.
full explanation, related older version of boost , vs, can found here: how specify, version of boost library link to?.
in case of vs2015, here how corresponding lines of code in boost/config/auto_link.hpp should appear:
# elif defined(boost_msvc) && (boost_msvc < 1800) // vc11: # define boost_lib_toolset "vc110" # elif defined(boost_msvc) && (boost_msvc < 1900) // vc12: # define boost_lib_toolset "vc120" # elif defined(boost_msvc) // vc14: # define boost_lib_toolset "vc140"
implementing these lines solved problem.
Comments
Post a Comment