2> LINK: fatal error LNK1104: cannot open file 'libboost_filesystem-vc120-mt-sgd-1_58.lib'

And it is not surprising that there is no such file in ...\boost_1_58_0\stage\lib . How can I get it? I have only:

 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 

. I tried to compile boost with various options, ending with the application --build-type=complete to it (poor person solution from LNK1104 linker error 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 proposed in the readme of the project that I import is still not happy. This is a CMake project in which I put some effort into building an MSVS solution for.

NB: my problem was resolved upon careful consideration of CMake gui:

enter image description here

I realized that the Debug configuration was not built and, of course, enough when I right-clicked on “Solution”> “Configuration Manager”> changed to the release version, everything was in order. However, the question remains: how can I get these libboost_filesystem-vc120-mt- sgd -1_58.lib?

+6
source share
1 answer

You need to have runtime-link=static runtime-debugging=on variant=debug on b2 command line to get sgd .

From enlarge documents about library names in Windows (in particular, in the ABI tag):

ABI tag: encodes parts that affect how the library interacts with other compiled code. For each such function, one 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. | 
+12
source

Source: https://habr.com/ru/post/985716/


All Articles