6

And no wonder as there is no such file in ...\boost_1_58_0\stage\lib. How can I get one ? I only have:

boost_1_58_0\stage\lib\libboost_filesystem-vc120-mt-s-1_58.lib
boost_1_58_0\stage\lib\libboost_filesystem-vc120-s-1_58.lib

in there. Tried to compile boost with various options ending up with tacking --build-type=complete to it (the "poor man's" solution from Linker error LNK1104 with 'libboost_filesystem-vc100-mt-s-1_49.lib') to get:

> b2 toolset=msvc threadapi=win32 link=static runtime-link=static \
variant=release address-model=32 --with-filesystem --with-locale --with-regex \
--with-system --with-iostreams --build-type=complete

the command line being suggested in the readme of the project that I am importing - still no joy. It is a CMake project I got into some pains to build an MSVS solution for.

NB: my problem was solved when looking carefully at the CMake gui:

enter image description here

I realized that it is the Debug configuration that did not build and sure enough when I right clicked on the "solution" > Configuration Manager > changed to a release build all was ok. Still the question remains - how do I get those libboost_filesystem-vc120-mt-sgd-1_58.lib builds ?

Community
  • 1
  • 1
Mr_and_Mrs_D
  • 32,208
  • 39
  • 178
  • 361

1 Answers1

12

You'd need to have runtime-link=static runtime-debugging=on variant=debug in the b2 command line args to get sgd.

From the boost docs about library naming on Windows (specifically the ABI tag portion):

ABI tag: encodes details that affect the library's interoperability with other compiled code. For each such feature, a single letter is added to the tag:

Key  |  Use this library when:                                |  Boost.Build option
=====================================================================================
 s   |  linking statically to the C++ standard library and    |  runtime-link=static
     |  compiler runtime support libraries.                   | 
-------------------------------------------------------------------------------------
 g   |  using debug versions of the standard and runtime      |  runtime-debugging=on
     |  support libraries.                                    |
-------------------------------------------------------------------------------------
 y   |  using a special debug build of Python.                |  python-debugging=on
-------------------------------------------------------------------------------------
 d   |  building a debug version of your code.                |  variant=debug
-------------------------------------------------------------------------------------
 p   |  using the STLPort standard library rather than the    |  stdlib=stlport
     |  default one supplied with your compiler.              |
Fraser
  • 74,704
  • 20
  • 238
  • 215
  • Wow thanks - are `variant=release` and `variant=debug` exclusive ? In other words would it be enough to just add `runtime-debugging=on variant=debug` in my command line above (I already have `runtime-link=static`) – Mr_and_Mrs_D Apr 22 '15 at 23:42
  • 1
    I think if you leave `variant` out altogether it builds debug and release by default. I also *think* (not sure) that it chooses `runtime-debugging=on` by default when it's building the debug version. Basically, try running your original command without the `variant` flag. – Fraser Apr 22 '15 at 23:59
  • Dropped the `variant` and sure enough`C:\_\boost_1_58_0\stage\lib\libboost_filesystem-vc120-mt-sgd-1_58.lib C:\_\boost_1_58_0\stage\lib\libboost_filesystem-vc120-sgd-1_58.lib` were added - (4 times bigger than the other variants) - closing :) – Mr_and_Mrs_D Apr 23 '15 at 01:01
  • 1
    Hi, how do I set these command args in the visual studio 2013 properties? Do such options exist outside of running from the command line? – James Wierzba Jun 19 '15 at 13:44