[Win32 VC70 Linking] Hard coding library name for the final linking ('libboost_filesystem-vc7-mt-s-1_33_1.lib' ...)?

Hi, All, I have a weired problem in linking libtorrent dll with my application. The libtorrent depends on 3 boost projects. This is what I got: test fatal error LNK1104: cannot open file 'libboost_filesystem-vc7-mt-s-1_33_1.lib' It looks like I have to build libboost_filesystem-vc7-mt-s-1_33_1.lib, and add this library explicitly in the final linking, no mater what my project setting is. The library filename must be named above. I also built a VC 7.0 from scratch (which contains all the needed boost source (not the prebuilt library)), it all ends the same linker error. Mystereous as it is, I am a little suspecious now. Is it possible that this library name is actually coded somewhere by some algorithm? Best regards, Allen Zhao

Allen Zhao wrote:
Mystereous as it is, I am a little suspecious now. Is it possible that this library name is actually coded somewhere by some algorithm?
See http://www.boost.org/more/getting_started.html#Results and http://www.boost.org/more/getting_started.html#auto-link -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - Grafik/jabber.org

I have a weired problem in linking libtorrent dll with my application. The libtorrent depends on 3 boost projects.
This is what I got: test fatal error LNK1104: cannot open file 'libboost_filesystem-vc7-mt-s-1_33_1.lib'
It looks like I have to build libboost_filesystem-vc7-mt-s-1_33_1.lib, and add this library explicitly in the final linking, no mater what my project setting is. The library filename must be named above. I also built a VC 7.0 from scratch (which contains all the needed boost source (not the prebuilt library)), it all ends the same linker error.
There has been some other discussion around here about libtorrent not building with VC7 anyway, but to answer your question: That library (with that name) is built by the bjam build system when you build/install Boost, please refer to the getting started guide at http://www.boost.org/more/getting_started.html for more information. If you really want to go it alone, then defining BOOST_ALL_NO_LIB when building will disable the auto-linking feature (again this is in the getting started guide). The reason for this feature BTW is to ensure that the library you link against is binary compatible with your current build settings: since there are 6 binary-incompatible build options for VC7 at least, picking the right variant otherwise is error prone. John.

John Maddock wrote:
If you really want to go it alone, then defining BOOST_ALL_NO_LIB when
Thanks for the tip. I just figure this out after studying the jamfile for the the libtorrent. I guess I will have to read document from both libtorrent and boost. :-) Best regards, Allen Zhao
John.
participants (3)
-
Allen Zhao
-
John Maddock
-
Rene Rivera