c++部分三方库环境配置

写在前面的一些坑

  1. 在系统中配置环境变量之后,需要重新启动QT,QT才能识别到这些新加的系统环境变量
  2. 每一次配置了新的库,或者是添加了新的组件在界面上等出现了无法识别链接的情况,建议 菜单栏的构建-> 重新构建项目一下
  3. 在链接lib库的时候需要注意的点
# 1、如果库的地址中间有空格需要用 $$quote,如下
LIBS += $$quote(F:/Program installaddress/MATLAB/R2018a/extern/lib/win64/microsoft/libmat.lib)

# 2、在链接库的时候写下了完整地址,在地址前加上-L可能会连接失败
LIBS += -L$$quote(F:/Programinstalladdress/MATLAB/R2018a/extern/lib/win64/microsoft/libmat.lib)

# 3、建议使用的方式,此时文件的后缀.lib需要省略
LIBS += -LF:/Programinstalladdress/MATLAB/R2018a/extern/lib/win64/microsoft/ \
-llibmat

首先明确几个概念

1. 包含目录:

在程序的源文件(如 .c 和 .cpp 文件)编辑阶段,为了使用第三方库,我们一般会在编辑器中使用 #include 指令来包含库的头文件( .h或 .hpp 文件),那么就需要告知 Visual Studio 第三方库的头文件在什么地方(配置路径)。

2. 库目录 :

编写好程序的源文件后,在编译阶段,编译器会根据头文件中声明的函数、类等信息去寻找这个函数或类的实现文件(如 .lib 文件),这就需要告知 Visual Studio 第三方库中的函数、类等的实现文件在什么地方(配置路径)。

3. 库文件:

源文件经过编译后会生成一系列目标文件(如 .o 文件),然后链接器将目标文件链接起来形成最终的可执行文件(如 .exe 文件),这就需要告知链接器具体需要链接第三方库中的哪些库文件(配置文件,就是 .lib 文件),一般第三方库会包含很多模块,可以只选择自己需要的模块的库文件,这样在调试编译时会快一些,如果不是特别影响速度的话,也可直接包含第三方库的总的库文件。

4. 动态链接和静态链接:

链接器在链接目标文件并生成最终的可执行文件时,有静态链接和动态链接两种方式。静态链接就是将所用到的第三方库的内容包含进程序的可执行文件中(如 .exe 文件),这样在没有安装所需库的相应功能的计算机上也可以直接运行该程序,缺点是,如果用到的库的内容比较大的话,最终程序的可执行文件相应的也很大。动态链接就是不将所用到的第三方库的内容包含进程序的可执行文件中,而只是写入一些必要的信息,以便程序运行时能正确调用所需功能。这个时候就需要计算机上装有第三方库,并正确配置计算机的环境变量,以便程序运行时能正确找到所需的动态链接库。

5. 项目配置基本位置

如下配置只对当前当前项目有效

a、右键项目->属性->VC++目录

箭头指向的位置从上到下分别是配置包含目录以及库目录
在这里插入图片描述

b、右键项目->属性->链接器->输入->附加依赖项

箭头指向的位置配置具体依赖的库文件
在这里插入图片描述

6. 对某一类程序做配置

在 视图->其他窗口-> 属性管理器中,选择自己的解决方案配置以及解决方案平台(在此选择release|X64),双击Microsoft.Cpp.x64.user,之后的配置和上面一致。
以后创建的项目会自动继承此处的配置。

在这里插入图片描述

![[Pasted image 20221029114631.png]]

7.明确当前的配置以及平台

需要明确自己当前配置的release还是debug,自己当前的平台使用的是64位还是32位。否则配置好环境后还是没法使用。
在这里插入图片描述

Opencv 4.6

1. 软件下载

下载地址:Releases - OpenCV
下载之后双击解压缩即可,解压后会出现如下目录:
![[Pasted image 20221029110455.png]]

2. 配置系统环境

将以下两个目录添加到系统环境中

#此处用的vc14
opencv\opencv\build\x64\vc14\bin
or
opencv\opencv\build\x64\vc15\bin

3. 配置项目环境

在配置的时候注意些完整地址,此处只是部分地址,注意区分

a、在包含目录中添加以下目录

\opencv\opencv\build\include

b、在库目录添加以下目录

## X64表示64位,此处用的vc14
\opencv\opencv\build\x64\vc14\lib

c 、在库文件中添加以下文件

## 后缀有d的表示debug版本
## 在配置的时候注意区分,此处用的VC14
\opencv\opencv\build\x64\vc14\lib\opencv_world460.lib

4、测试代码

#include <opencv2/opencv.hpp>
#include <iostream>

using namespace std;
using namespace cv;

int main()
{
    //OpenCV版本号
    cout << "OpenCV_Version: " << CV_VERSION << endl;
    
    //读取图片,地址改成自己本地的图片
    Mat img = imread("C:/Users/admin/Pictures/2020-06-21.png");

    imshow("picture", img);
    waitKey(0);
    return 0;
}

gsl2.6-c++端的数学库

参考链接 :(33条消息) 【C++】VS2019配置GSL库_G.Chenhui的博客-CSDN博客_gsl vs2019

在VS中直接安装

项目右键->管理NuGet程序包,搜索gsl,安装即可。X86—》代表32位,X64—》代表64位。但是版本只有2.3.
![[Pasted image 20221029115635.png]]

1. 软件下载以及编译

1.1 软件下载

官网源码GSL - GNU Scientific Library - GNU Project - Free Software Foundation

编译好的版本 GSL2.7

github版本 :已经配置好了了VS的编译

git clone https://github.com/BrianGladman/gsl.git my_gsl

1.2 源码编译

参考连接:(33条消息) VS2019配置GSL库_旷夷的博客-CSDN博客_gsl库

a、把在github上下载的文件解压,并找到gsl-master/build.vc下的gsl.lib.sln,使用vs运行,VS显示如下:
![[Pasted image 20221029161729.png]]

b、选择编译gslhdrs,在运行前需要设置工程属性。 在gslhdrs属性页,选择VC++目录>>包含目录,添加解压后的目录(即到my-gsl 的完整地址)
![[Pasted image 20221029162528.png]]

c、添加解压后的路径,然后执行生成,过程中会提示没有config.h,后来发现可以直接注释,当目前为止,注释掉后还没发现异常问题。 编译完成后,在my-gsl/lib/x64/Release下产生相应的lib文件。
![[Pasted image 20221029162806.png]]

2. 配置项目环境

在配置的时候注意些完整地址,此处只是部分地址,注意区分

a、在包含目录中添加以下目录

\gsl-2.6-msvc\include

b、在库目录添加以下目录

## X64表示64位
\gsl-2.6-msvc\lib\x64\Release

c 、在库文件中添加以下文件

## 后缀有d的表示debug版本
## 在配置的时候注意区分
\gsl-2.6-msvc\lib\x64\Release\gsl.lib
\gsl-2.6-msvc\lib\x64\Release\gslcblas.lib
\gsl-2.6-msvc\lib\x64\Release\amplgsl.lib

libtorch1.8.2 -pytorch C++ 版

1. 软件下载

下载地址:Start Locally | PyTorch,下载之后直接解压缩,即可。
![[Pasted image 20221029170337.png]]

注意:此处安装的CUDA版本,若需使用GPU之前需要提前配置CUDA环境。
在VS2017中使用可能无法使用CUDA,需要在 项目属性页->链接器->命令行->其他选项 中添加如下代码:

/INCLUDE:?warp_size@cuda@at@@YAHXZ 

2. 配置系统环境

将以下两个目录添加到系统环境中

\libtorch_gpu\lib

3. 配置项目环境

在配置的时候注意些完整地址,此处只是部分地址,注意区分

a、在包含目录中添加以下目录

\libtorch_gpu\include\torch\csrc\api\include
\libtorch_gpu\include

b、在库目录添加以下目录

## X64表示64位
\libtorch_gpu\lib

c 、在库文件中添加以下文件

## 后缀有d的表示debug版本
## 在配置的时候注意区分
\libtorch_gpu\lib\clog.lib
\libtorch_gpu\lib\cpuinfo.lib
\libtorch_gpu\lib\dnnl.lib
\libtorch_gpu\lib\fbgemm.lib
\libtorch_gpu\lib\fbjni.lib
\libtorch_gpu\lib\gloo.lib
\libtorch_gpu\lib\gloo_cuda.lib
\libtorch_gpu\lib\libprotobuf.lib
\libtorch_gpu\lib\libprotobuf-lite.lib
\libtorch_gpu\lib\libprotoc.lib
\libtorch_gpu\lib\mkldnn.lib
\libtorch_gpu\lib\pthreadpool.lib
\libtorch_gpu\lib\pytorch_jni.lib
\libtorch_gpu\lib\torch.lib
\libtorch_gpu\lib\torch_cpu.lib
\libtorch_gpu\lib\torch_cuda.lib
\libtorch_gpu\lib\XNNPACK.lib
\libtorch_gpu\lib\asmjit.lib
\libtorch_gpu\lib\c10.lib
\libtorch_gpu\lib\c10_cuda.lib
\libtorch_gpu\lib\c10d.lib
\libtorch_gpu\lib\caffe2_detectron_ops_gpu.lib
\libtorch_gpu\lib\caffe2_module_test_dynamic.lib
\libtorch_gpu\lib\caffe2_nvrtc.lib

4、测试代码

#include <iostream>
#include <torch/torch.h>
 
int main()
{
    
    torch::Tensor tensor = torch::rand({ 5,3 });
    std::cout << tensor << std::endl;
 
    return EXIT_SUCCESS;
}

NumCPP–是numpy的C++版本

NumCPP 依赖于Boost,所以需要先安装boost;[[#Boost 1 7]]安装教程。
参考连接: (33条消息) vs2017+win10配置Boost与NumCpp,以及boost与PLC 1.8.1冲突的解决方法_微凉的衣柜的博客-CSDN博客_numcpp

1. 软件下载以及编译

1.1 软件下载

下载地址:GitHub - dpilger26/NumCpp: C++ implementation of the Python Numpy library

1.2 编译

a、将压缩包解压后,创建build目录
![[Pasted image 20221029183916.png]]

b、之后以管理员权限运行以下命令

cd build# 进入上面创建的build文件夹

cmake ..#编译build上一层目录中的CMakeLists

cmake --build . --target install


c、到此为止NumCpp都编译完成。Numpy编译得到的文件默认在C:\Program Files (x86)\NumCpp下,可以去看一看这个目录有没有相应的文件。

2. 配置项目环境

在配置的时候注意些完整地址,此处只是部分地址,注意区分

a、在包含目录中添加以下目录

\NumCpp\include

3. 测试代码

#include <cstdio>
#include <iostream>
#include "include\\NumCpp.hpp"

int main() {
    
    nc::NdArray<int> a0 = { {1, 2}, {3, 4} };

    return 0;
}

Boost 1.7

1. 软件下载以及编译

1.1 软件下载

下载地址:Version 1.76.0 (boost.org)
下载之后双击解压缩即可,解压后会出现如下目录:
![[Pasted image 20221029173253.png]]

1.2 软件编译
a、双击批处理文件:bootstrap.bat,接下来需要会得到一个b2.exe文件。
b、以管理有身份进入Windows PowerShell
c、cd 到boost的目录,并输入如下命令
# –link=shared :生成动态链接库
# –toolset=msvc-14.1:编译的库在vs2017环境下运行,查看自己的msvc版本可以在VS-》项目属性页-》配置属性-》常规-》平台工具集中,我的显示的是Visual Studio 2017 (v141)
# –stagedir=“D:\Boost64”:编译库所在的目录,此处可以新建一个文件夹。
# –address-model=64:生成64位平台库
# –architecture=x64:可在vs x64平台下调试。(实际会生成32位的库和64位库)
.\b2.exe --link=shared --toolset=msvc-14.1 --stagedir="D:\Boost64" --address-model=64 --architecture=x64

编译完成之后会产生如下目录
![[Pasted image 20221029180344.png]]

![[Pasted image 20221029180437.png]]

2. 配置项目环境

在配置的时候注意些完整地址,此处只是部分地址,注意区分

a、在包含目录中添加以下目录

\boost_1_76_0_msvcx64\include

b、在库目录添加以下目录

## X64表示64位
\boost_1_76_0_msvcx64\lib

c 、在库文件中添加以下文件

## 后缀有d的表示debug版本
## 在配置的时候注意区分
\boost_1_76_0_msvcx64\lib\libboost_chrono-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_chrono-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_chrono-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_chrono-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_container-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_container-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_container-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_container-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_context-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_context-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_context-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_context-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_contract-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_contract-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_contract-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_contract-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_coroutine-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_coroutine-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_coroutine-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_coroutine-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_date_time-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_date_time-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_date_time-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_date_time-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_exception-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_exception-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_exception-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_exception-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_fiber-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_fiber-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_fiber-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_fiber-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_filesystem-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_filesystem-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_filesystem-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_filesystem-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_graph-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_graph-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_graph-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_graph-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_iostreams-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_iostreams-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_iostreams-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_iostreams-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_json-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_json-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_json-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_json-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_locale-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_locale-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_locale-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_locale-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_log_setup-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_log_setup-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_log_setup-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_log_setup-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_log-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_log-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_log-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_log-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_math_c99f-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_math_c99f-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_math_c99f-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_math_c99f-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_math_c99l-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_math_c99l-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_math_c99l-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_math_c99l-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_math_c99-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_math_c99-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_math_c99-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_math_c99-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_math_tr1f-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_math_tr1f-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_math_tr1f-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_math_tr1f-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_math_tr1l-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_math_tr1l-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_math_tr1l-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_math_tr1l-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_math_tr1-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_math_tr1-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_math_tr1-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_math_tr1-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_nowide-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_nowide-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_nowide-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_nowide-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_prg_exec_monitor-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_prg_exec_monitor-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_prg_exec_monitor-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_prg_exec_monitor-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_program_options-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_program_options-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_program_options-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_program_options-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_python39-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_python39-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_python39-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_python39-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_random-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_random-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_random-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_random-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_regex-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_regex-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_regex-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_regex-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_serialization-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_serialization-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_serialization-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_serialization-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_stacktrace_noop-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_stacktrace_noop-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_stacktrace_noop-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_stacktrace_noop-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_stacktrace_windbg_cached-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_stacktrace_windbg_cached-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_stacktrace_windbg_cached-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_stacktrace_windbg_cached-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_stacktrace_windbg-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_stacktrace_windbg-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_stacktrace_windbg-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_stacktrace_windbg-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_system-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_system-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_system-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_system-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_test_exec_monitor-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_test_exec_monitor-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_test_exec_monitor-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_test_exec_monitor-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_thread-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_thread-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_thread-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_thread-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_timer-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_timer-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_timer-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_timer-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_type_erasure-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_type_erasure-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_type_erasure-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_type_erasure-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_unit_test_framework-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_unit_test_framework-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_unit_test_framework-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_unit_test_framework-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_wave-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_wave-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_wave-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_wave-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_wserialization-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_wserialization-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_wserialization-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_wserialization-vc141-mt-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_atomic-vc141-mt-gd-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_atomic-vc141-mt-gd-x64-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_atomic-vc141-mt-x32-1_76.lib
\boost_1_76_0_msvcx64\lib\libboost_atomic-vc141-mt-x64-1_76.lib

3、测试代码

#include<iostream>
#include<stdio.h>

#include<boost/version.hpp>	//包含boost头文件
#include<boost/config.hpp>

int main() {
	using namespace std;
	cout << BOOST_VERSION << endl;
	cout << BOOST_LIB_VERSION << endl;
	cout << BOOST_PLATFORM << endl;
	cout << BOOST_COMPILER << endl;
	cout << BOOST_STDLIB << endl;

	system("pause");
	return 0;
}
  • 0
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值