Page 1 of 1

Boost linker errors MSVC11

Posted: Thu Jun 20, 2013 8:10 pm
by jorrit5477
Hi,

I'm getting linker errors when compiling with Boost when compiling v1-9 with MSVC11 (no other compiler used). It seems the lines

Code: Select all

if(Boost_FOUND)
  list(REMOVE_DUPLICATES Boost_LIBRARIES)
endif()
in CMake/Dependencies.cmake are causing me some troubles.

The results of this are:

Code: Select all

Boost_LIBRARIES:
optimized;D:/Development/Libraries/Boost/lib/libboost_thread-vc110-mt-1_53.lib;
debug;D:/Development/Libraries/Boost/lib/libboost_thread-vc110-mt-gd-1_53.lib;
D:/Development/Libraries/Boost/lib/libboost_date_time-vc110-mt-1_53.lib;
D:/Development/Libraries/Boost/lib/libboost_date_time-vc110-mt-gd-1_53.lib;
D:/Development/Libraries/Boost/lib/libboost_system-vc110-mt-1_53.lib;
D:/Development/Libraries/Boost/lib/libboost_system-vc110-mt-gd-1_53.lib;
D:/Development/Libraries/Boost/lib/libboost_chrono-vc110-mt-1_53.lib;
D:/Development/Libraries/Boost/lib/libboost_chrono-vc110-mt-gd-1_53.lib
while without the REMOVE_DUPLICATES I get

Code: Select all

Boost_LIBRARIES:
optimized;D:/Development/Libraries/Boost/lib/libboost_thread-vc110-mt-1_53.lib;
debug;D:/Development/Libraries/Boost/lib/libboost_thread-vc110-mt-gd-1_53.lib;
optimized;D:/Development/Libraries/Boost/lib/libboost_date_time-vc110-mt-1_53.lib;
debug;D:/Development/Libraries/Boost/lib/libboost_date_time-vc110-mt-gd-1_53.lib;
optimized;D:/Development/Libraries/Boost/lib/libboost_thread-vc110-mt-1_53.lib;
debug;D:/Development/Libraries/Boost/lib/libboost_thread-vc110-mt-gd-1_53.lib;
optimized;D:/Development/Libraries/Boost/lib/libboost_date_time-vc110-mt-1_53.lib;
debug;D:/Development/Libraries/Boost/lib/libboost_date_time-vc110-mt-gd-1_53.lib;
optimized;D:/Development/Libraries/Boost/lib/libboost_system-vc110-mt-1_53.lib;
debug;D:/Development/Libraries/Boost/lib/libboost_system-vc110-mt-gd-1_53.lib;
optimized;D:/Development/Libraries/Boost/lib/libboost_chrono-vc110-mt-1_53.lib;
debug;D:/Development/Libraries/Boost/lib/libboost_chrono-vc110-mt-gd-1_53.lib
Notice the optimized; & debug; preceding the respective debug & release libraries are stripped from the list. When commenting out the aforementioned lines in Dependencies.cmake everything works fine.

Is it used for a particular platform? I noticed it was introduced with some issues from https://ogre3d.atlassian.net/browse/OGRE-207, which is related to Linux builds. I am not sure if this issue only occurs with MSVC.

Best,
Jorrit

Re: Boost linker errors MSVC11

Posted: Thu Jun 20, 2013 9:35 pm
by Transporter
I'm already fixing it. I have the same error with MSVC10.

Linking property:

Code: Select all

kernel32.lib
user32.lib
gdi32.lib
winspool.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
comdlg32.lib
advapi32.lib
C:\Dev\boost\stage\vc100-amd64\libboost_thread-vc100-mt-gd-1_54.lib
C:\Dev\boost\stage\vc100-amd64\libboost_date_time-vc100-mt-1_54.lib
C:\Dev\boost\stage\vc100-amd64\libboost_date_time-vc100-mt-gd-1_54.lib
C:\Dev\boost\stage\vc100-amd64\libboost_system-vc100-mt-1_54.lib
C:\Dev\boost\stage\vc100-amd64\libboost_system-vc100-mt-gd-1_54.lib
C:\Dev\boost\stage\vc100-amd64\libboost_atomic-vc100-mt-1_54.lib
C:\Dev\boost\stage\vc100-amd64\libboost_atomic-vc100-mt-gd-1_54.lib
C:\Dev\boost\stage\vc100-amd64\libboost_chrono-vc100-mt-1_54.lib
C:\Dev\boost\stage\vc100-amd64\libboost_chrono-vc100-mt-gd-1_54.lib
C:\Dev\vc100-amd64\Dependencies\lib\Debug\FreeImageLib.lib
C:\Dev\vc100-amd64\Dependencies\lib\Debug\zziplibd.lib
C:\Dev\vc100-amd64\Dependencies\lib\Debug\ZLib.lib
EDIT1: Bug report https://ogre3d.atlassian.net/browse/OGRE-210

EDIT2:
Solved: https://bitbucket.org/sinbad/ogre/pull- ... for-atomic

Re: Boost linker errors MSVC11

Posted: Wed Jun 26, 2013 9:29 am
by jorrit5477
Noticed the fix, thank you!