Повышение: фатальная ошибка LNK1104: не удается открыть файл (lib) - PullRequest
0 голосов
/ 23 марта 2020

Я перечитал все темы о проблемах повышения, я думаю, но моя проблема в другом: я получаю сообщение об ошибке в моем VS: 1>LINK : fatal error LNK1104: cannot open file 'C:\boost_1_72_0\stage\lib\boost_python37-vc140-mt-gd-x32-1_67.lib' Я снова установил с командой b2 & bootstrap в VS все библиотеки снова. эти имена для python: например: libboost_python37-vc141-mt-gd-x32-1_72, почему VS спрашивает меня о vc140 и 1_67 в названии этой библиотеки? И как я могу это решить?

1 Ответ

0 голосов
/ 23 марта 2020

Причина проблемы, упомянутая в комментариях, одна буст-версия (1.67) установлена ​​ранее. Решение: в буст-документах найдено: https://www.boost.org/doc/libs/1_72_0/more/getting_started/windows.html

Build From the Visual Studio IDE
From Visual Studio's File menu, select New > Project…

In the left-hand pane of the resulting New Project dialog, select Visual C++ > Win32.

In the right-hand pane, select Win32 Console Application (VS8.0) or Win32 Console Project (VS7.1).

In the name field, enter “example”

Right-click example in the Solution Explorer pane and select Properties from the resulting pop-up menu

In Configuration Properties > C/C++ > General > Additional Include Directories, enter the path to the Boost root directory, for example

C:\Program Files\boost\boost_1_72_0

In Configuration Properties > C/C++ > Precompiled Headers, change Use Precompiled Header (/Yu) to Not Using Precompiled Headers.2

Replace the contents of the example.cpp generated by the IDE with the example code above.

From the Build menu, select Build Solution.
...