我正在尝试安装boost以正确运行PyGMO。但是,在我将它解压缩到一个目录后(没有使用git)。
在运行bootstrap vc142
之后(我使用的是VScode V1.63.2,我在windows上)。我得到了一个错误:
Building Boost.Build engine
LOCALAPPDATA=C:\Users\wojci\AppData\Local
could not find "vswhere"
Call_If_Exists "..\bin\VCVARS32.BAT"
###
### Using 'msvc' toolset.
###
其次是:
C:\Program Files\boost\boost_1_78_0\tools\build\src\engine>dir *.exe
Volume in drive C has no label.
C:\Program Files\boost\boost_1_78_0\tools\build\src\engine>copy /b .\b2.exe .\bjam.exe
The system cannot find the file specified.
Failed to build Boost.Build engine.
有人知道如何解决这个问题吗?
提前谢谢你
发布于 2022-04-14 18:31:07
我找到了解决方案这里(git)
前提条件:
mklink /J C:\MinGW "C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64"
set PATH=%PATH%;C:\MinGW\bin
setx /M PATH "%PATH%"
g++ --version
安装boost的方法:
cd C:\install\boost_1_78_0
mkdir C:\boost-build
mkdir C:\install\boost_1_78_0\boost-build
mkdir C:\boost
cd C:\install\boost_1_78_0\tools\build
bootstrap.bat gcc
b2 --prefix="C:\boost-build" install
set PATH=%PATH%;C:\boost-build\bin
cd C:\install\boost_1_78_0
b2 --build-dir="C:\install\boost_1_78_0\build" --build-type=complete --prefix="C:\boost" toolset=gcc install
额外注释:
这也适用于boost 1.68.0,其他版本也可以使用,只需用1_78_0替换1_68_0即可。
最后,您应该有三行代码如下所示:
...failed updating 72 targets...
...skipped 292 targets...
...updated 22164 targets...
如果您有一些失败的和跳过的文件,这是完全可以的。
发布于 2022-11-09 11:25:33
为我工作过。希望能帮上忙。
https://stackoverflow.com/questions/71832753
复制相似问题