我正在尝试使用Visual Studio 2015 v14 x64在Windows上构建ORBSLAM2。 ORBSLAM2的这个特定分支与C/C++ Boost库具有依赖性。
到目前为止,我已经执行了以下步骤:
A。)我下载并构建了here所述的Boost库:
$ bootstrap.bat
$ b2 link=static runtime-link=static release stage
$ bjam install --toolset=msvc variant=release link=static threading=multi runtime-link=static
B。)然后我为项目配置了以下属性:
项目属性-> C / C ++->常规->其他包含目录
D:\ORB_SLAM2\Thirdparty\boost_1_64_0\
项目属性->链接器->输入->其他依赖项
D:\ORB_SLAM2\Thirdparty\boost_1_64_0\stage\lib\
构建时出现以下链接器错误:
1>------ Rebuild All started: Project: ZERO_CHECK, Configuration: Release x64 ------
1> Checking Build System
1> CMake does not need to re-run because D:/ORB_SLAM2/build/CMakeFiles/generate.stamp is up-to-date.
2>------ Rebuild All started: Project: ORB_SLAM2, Configuration: Release x64 ------
2> Building Custom Rule D:/ORB_SLAM2/CMakeLists.txt
2> CMake does not need to re-run because D:/ORB_SLAM2/build/CMakeFiles/generate.stamp is up-to-date.
2> System.cc
2> Tracking.cc
2> LocalMapping.cc
2> LoopClosing.cc
2> ORBextractor.cc
...
...
...
2> Viewer.cc
2> Generating Code...
2> ORB_SLAM2.vcxproj -> D:\ORB_SLAM2\build\Release\ORB_SLAM2.lib
3>------ Rebuild All started: Project: mono_euroc, Configuration: Release x64 ------
3> mono_euroc.cc
3>LINK : fatal error LNK1181: cannot open input file 'D:\ORB_SLAM2\Thirdparty\boost_1_64_0\stage\lib\.obj'
========== Rebuild All: 2 succeeded, 1 failed, 0 skipped ==========
奇怪的是,链接器仅在寻找.obj
,不涉及文件名。知道是什么问题吗?
答案 0 :(得分:0)
我通过在Visual Studio 2015 IDE中使用NuGet Packet Manager
安装Boost库解决了这个问题。
Manage NuGet Packages for Solution
boost-vc140
(Sergey Shandar撰写)Boost
链接的项目C:\<path-to-your-project>\build\packages\boost.1.64.0.0\lib\native\include
” C:\<path-to-your-project>\build\packages\boost_serialization-vc140.1.64.0.0\lib\native\address-model-64\lib\libboost_serialization-vc140-mt-s-1_64.lib
”