【C++】准标注库boost的安装

目录

 

1.源码

2.一些参考链接

3.测试程序


1.源码

https://dl.bintray.com/boostorg/release/1.75.0/source/

2.一些参考链接

参考链接1-windows下

参考链接2-windows+Linux

参考链接3-Linux下有效编译

Linux下的编译与安装:
wget https://dl.bintray.com/boostorg/release/1.75.0/source/boost_1_75_0.tar.gz
gzip -dv boost_1_75_0.tar.gz
tar -zxvf boost_1_75_0.tar
./bootstrap.sh --with-libraries=all
./b2
./b2 install

3.测试程序

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

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

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

    return 0;
}

猜你喜欢

转载自blog.csdn.net/Edidaughter/article/details/114489460