Boost linker errors MSVC11

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
Post Reply
User avatar
jorrit5477
Gremlin
Posts: 181
Joined: Thu Feb 09, 2006 1:48 am
Location: The Netherlands

Boost linker errors MSVC11

Post 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
Transporter
Minaton
Posts: 933
Joined: Mon Mar 05, 2012 11:37 am
Location: Germany
x 110

Re: Boost linker errors MSVC11

Post 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
User avatar
jorrit5477
Gremlin
Posts: 181
Joined: Thu Feb 09, 2006 1:48 am
Location: The Netherlands

Re: Boost linker errors MSVC11

Post by jorrit5477 »

Noticed the fix, thank you!
Post Reply