I am attempting to compile and link a small test application using STLPort_5.1.3, boost_1_34_1 and MSVC8 sp1.  Everything works fine when I don't have to link against any boost libraries.  To test linking against the boost static libraries I wrote a simple little test app that used the boost::regex library and ran into errors.  I am not completely sure that this is a boost issue but since I can compile and link programs without any problems that don't use boost binaries I wasn't sure of who else to turn to.   The linker error I am getting is:

1>LINK : fatal error LNK1104: cannot open file 'stlportstld_x.5.1.lib'

The problem is that all of the stlport libraries are named stlportstld.5.1.lib or similar.  I did try to just rename the library to make it match but, of course, I got a boat load of unresolved external linker errors pointing to names such as "stlpdx_std::basic_string."  Looking at a dumpbin output of the actual regex library it is linking against, libboost_regex-vc80-mt-sgdp-1
_34_1.lib, I found linker directives of the form:

   /DEFAULTLIB:"stlportstld_x.5.1.lib"
   /DEFAULTLIB:"libcpmtd"
   /DEFAULTLIB:"LIBCMTD"
   /DEFAULTLIB:"OLDNAMES"

I couldn't find anywhere that boost had put those directives in the libraries but I could be missing something so I also did a dumpbin of one of the stlport libraries, stlportd_static.5.1.lib, and only found the following linker directives:

   /DEFAULTLIB:"LIBCMTD"
   /DEFAULTLIB:"OLDNAMES"

I have to believe there are at least a few companies out there who have replaced the shipping MSVC STL for testing purposes, if for no other reason, and are also using Boost so hopefully I'm just missing something obvious.  Below are the steps I followed to compile both sets of libraries and the test application.  Let me know if anything appears to be off or if there is simply a better/easier way.

Thanks,

Jason Ivey


Open command prompt and run:
"%VS80COMNTOOLS%\vsvars32.bat"

STLPort_5.1.3
build\lib\configure -c msvc8
nmake /fmsvc.mak install

Boost_1_34_1
edit tools\build\v2\user-config.jam
    added line 45 with
    using stlport : : d:\\build\\stlport\\stlport d:\\build\\stlport\\lib ;
bjam --toolset=msvc stdlib=stlport --with-regex stage

Build Test Application
set include=d:\build\stlport\stlport;D:\build\boost_1_34_1;%include%
set lib=d:\build\stlport\lib;D:\build\boost_1_34_1\stage\lib;%lib%
call "%VS80COMNTOOLS%\..\IDE\devenv.exe" /useenv