Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Qpid lesson 2 configuring Boost dependent Library Environment variables

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Scene

Qpid depends on the Boost library. In general, when you use CMake to generate a VS solution, you need to specify the boost header file and the library file directory, otherwise the following compilation error occurs:

Could not find the following Boost libraries: boost_sysytem, boost_thread

Solution one:

Create a new one in the environment variable: named BOOST_ROOT with a value of E:\ work2\ boost_1_58_0

Solution 2:

Create a new one in the environment variable: named BOOST_INCLUDEDIR with a value of E:\ work2\ boost_1_58_0

Create a new one in the environment variable: named BOOST_LIBRARYDIR with a value of E:\ work2\ boost_1_58_0\ stage\ lib

Restart the system for the environment variables to take effect

Matters needing attention

1) CMake can only search dynamic libraries compiled by Boost, but static libraries cannot be searched.

2) directly from the official compiled package, and in the compiled package, the name of the library file directory is lib64-msvc-12.0, which needs to be modified to lib or stage/lib

How do FindBoost.cmake files search for Boost lib files?

The following is the script code to search for Boost lib, of course, if you do not modify the library file directory, you can add the following

${Boost_INCLUDE_DIR} / lib64-msvc-12.0

List (APPEND _ boost_LIBRARY_SEARCH_DIRS_$ {c})

${Boost_INCLUDE_DIR} / lib

${Boost_INCLUDE_DIR} /.. / lib

${Boost_INCLUDE_DIR} / stage/lib

)

3) download Boost source code compiled dynamic library

B2.exe-build-type=complete-build-dir=build_tmp toolset=msvc-14.0 address-model=32 stage

Description: stage instructions copy the compiled library files to the stage directory, save the files of the generation process in the build_tmp directory, and toolset specifies to use the VS2015 compiler

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report