和其他许多人一样,我在使用带有windows的boost库时遇到了问题。在Ubuntu16.04上,它对libboost所有的开发都很好,但是在windows上我有很多问题。
我试图构建一个密码应用程序,我可以在linux下编译完全没有任何错误。但是我也需要windows二进制文件,所以我完成了安装以下工具的步骤:
对于boost,我执行了以下步骤:
毫无办法。密码给我带来了一个错误,一些库,但不是所有的库都找不到。
我试图设置BOOST_ROOT,BOOST_LIBRARY_DIRS,BOOST_INCLUDE_DIRS -> Nothing。
我做错了什么?我从cmake中得到的错误是:
-- Building for: Visual Studio 12 2013
-- The C compiler identification is MSVC 18.0.31101.0
-- The CXX compiler identification is MSVC 18.0.31101.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
CMake Error at C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1928 (message):
Unable to find the requested Boost libraries.
Boost version: 1.58.0
Boost include path: C:/local/boost_1_58_0
Could not find the following static Boost libraries:
boost_system
boost_filesystem
boost_thread
boost_date_time
boost_chrono
boost_regex
boost_serialization
boost_program_options
Some (but not all) of the required Boost libraries were found. You may
need to install these additional Boost libraries. Alternatively, set
BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
to the location of Boost.
Call Stack (most recent call first):
CMakeLists.txt:113 (find_package)
-- WARNING: Git was not found!
-- Found PythonInterp: C:/Users/chris/AppData/Local/Programs/Python/Python36-32/python.exe (found version "3.6.4")
CMake Warning in CMakeLists.txt:
CMAKE_SKIP_INSTALL_RULES was enabled even though installation rules have
been specified
-- Configuring incomplete, errors occurred!
See also "C:/Users/chris/Documents/GitHub/cryptonote/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/chris/Documents/GitHub/cryptonote/build/CMakeFiles/CMakeError.log".也许有人能帮我解决这个问题?
问候
发布于 2017-12-22 14:54:45
好的,我终于找到了一个解决方案,在互联网上阅读了很多,更多的网页。
解决办法真的很简单。下载boost软件包并安装(或从源代码构建)之后,只需要以下两部分:
只需运行以下命令:
bootstrap.bat
b2 link=static runtime-link=static release stage这将创建所有库的静态,并使它可用于cmake。
这个解决方案对我有效,并使我能够构建所需的包。
谢谢所有的帮手
发布于 2018-02-15 15:35:45
或者,只需通过添加
工具集=msvc-12.0
(用于MS 2013 v12等)
到b2命令行:-)
https://stackoverflow.com/questions/47936353
复制相似问题