3

I'm having difficulties generating the correct boost .lib file to compile with a VS project I've been given. It appears that after performing the complete build installation using 'b2.exe' from VS2010 command prompt I'm only able to generate the boost library files that contain the 'lib' prefix.

When I come to compile my project I'm getting the following error message: "error LNK1104: cannot open file 'boost_signals-vc90-mt-1_47.lib'"

After going through the lib folder I can see that my boost build has only generated 'libboost_signals-vc90-mt-1_47.lib'

The boost documentation gives the following information about the lib prefix:

lib Prefix: except on Microsoft Windows, every Boost library name begins with this string. On Windows, only ordinary static libraries use the lib prefix; import libraries and DLLs do not.

So far I've attempted the following build options for the msvc-9.0 toolset: 'build-type=complete' 'link=static,shared'

Any advice on how I may be able to generate the required .lib file would be greatly appreciated. Many Thanks.

1 Answers1

0

link=static should be used whenever you're linking to static version of boost library. link=shared - should be used whenever you're linking dynamically to boost. It will add extra dependencies on boost dll's.

You can also use link=static,shared to build both versions - static and dynamic.

Define 'BOOST_ALL_DYN_LINK' in project controls how you link to boost. If it's defined - it's dynamic linking, if not defined - it's static linking.

TarmoPikaro
  • 4,723
  • 2
  • 50
  • 62