Boost logo

Boost-Build :

Subject: [Boost-build] msvc 10 library names
From: Bruce Visscher (bruce.visscher_at_[hidden])
Date: 2011-10-19 18:24:08


Hello,

I am trying to build libraries for use by Visual Studio 2010.  I am
building from cygwin bash but intend to use the resulting library
from Visual Studio.  For the moment (to reduce the dependencies) I am
using native threads rather than pthread-win32.

So, I have:

# Configure msvc (default version, searched for in standard locations and PATH).
using msvc ;

# Configure specific msvc version (searched for in standard locations and PATH).
using msvc : 10.0 ;

and:

# Configure specific Python version.
using python : 2.7 : /cygdrive/c/Python27 :
/cygdrive/c/Python27/include : cygdrive/c/Python27/libs ;

in my user-config.jam.

I built b2.exe using gcc.

When I try to build a trivial console application in VS that uses
boost::filesystem, I get:

fatal error LNK1104: cannot open file 'libboost_filesystem-vc100-mt-gd-1_47.lib'

The build command I use to build the library is:

b2 --build-directory=/tmp/build-boost toolset=msvc threadapi=win32
--layout=versioned --built-type=complete -q --with-filesystem
--prefix=/cygdrive/c/Users/visschb install

which creates these libraries and DLLs:

-rwxr-xr-x+ 1 visschb Domain Users 134656 Oct 19 18:07
../../bin/cygboost_filesystem-vc100-mt-1_47.dll
-rwxr-xr-x+ 1 visschb Domain Users 15360 Oct 19 18:07
../../bin/cygboost_system-vc100-mt-1_47.dll
-rwxr-xr-x+ 1 visschb Domain Users 129250 Oct 19 18:07
../boost_filesystem-vc100-mt-1_47.lib
-rwxr-xr-x+ 1 visschb Domain Users 2980 Oct 19 18:07
../boost_system-vc100-mt-1_47.lib
-rwxr-xr-x+ 1 visschb Domain Users 1508074 Oct 19 18:07
../libboost_filesystem-vc100-mt-1_47.a
-rwxr-xr-x+ 1 visschb Domain Users 83074 Oct 19 18:07
../libboost_system-vc100-mt-1_47.a

The questions I have at this point are:

1. What is the magic that generates the name

  libboost_filesystem-vc100-mt-gd-1_47.lib

when I compile?

2. What does the "-gd-" part of this name mean?

3. How can I get bjam to put "lib" in front of the library name?

4. How can I get bjam to put "lib" in front of the DLL name rather
   than "cyg" (if that is what is required..maybe it doesn't matter)?

5. How can I get bjam to append "-gd-" to the library and DLL names?

Thanks for any help,
Bruce


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk