views:

274

answers:

1

Hi there,

I'm trying to build my application with MSVC 2010 instead of GCC. With GCC everything works fine. My app uses boost_system and boost_thread libraries. I built boost with VC2010 in "system" layout, that means the libraries are named just libboost_system.lib (and not libboost_system_compiler_threading_version_wtf_snafu.lib) The libs reside in C:\Boost\lib, the Makefile specifies

LFLAGS        = /NOLOGO /INCREMENTAL:NO /SUBSYSTEM:CONSOLE
LIBS          = /LIBPATH:C:/Boost/lib libboost_system.lib libboost_thread.lib Ws2_32.lib

when invoking nmake it compiles, but when trying to link it quits with

LINK : fatal error LNK1104: cannot open file 'libboost_date_time-vc100-mt-1_43.lib

I mean seriously, WTF? I told it to link libboost_systen.lib and libboost_thread.lib how come it tries to link libboost_data_time and why does it assume I built the libs in "tagged" layout?? How can I stop MSVC trying to be smart and guess what I might have wanted to link?

Thanks, Philipp

+4  A: 

This is a feature of the Boost libs with compatible compilers for automatic linking.

(Those convoluted library names cover the myriad of threading and linking options that are available on the platform; there are good reasons to use that convention on Windows...)

More information here:

http://www.boost.org/doc/libs/1_33_1/more/getting_started.html#auto-link

I can't find a page for a more recent version, but I believe the BOOST_ALL_NO_LIB and related options are all still valid in 1.43.

Joe
Hey, that define did the trick. Thanks.
Philipp