<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                [TOC] ### **環境一:Windows** ***** #### 下載boost庫, [下載地址](http://sourceforge.net/projects/boost/files/boost/1.55.0/ ) ``` 解壓boost庫,例如解壓到D:\boost\boost_1_46_1 開始->程序->MicrosoftVisual Studio 2010->Visual Studio Tools->Visual Studio 命令提示(2010),打開一個控制臺 (需要設置環境變量) cd D:\boost\boost_1_46_1\boost_1_46_1 - 直接運行bootstrap.bat 會生成b2.exe跟bjam.exe 靜態庫 b2 debug runtime-link=static address-model=64 define=BOOST_USE_WINAPI_VERSION=0x0501 stage 動態庫 b2 debug runtime-link=shared address-model=64 define=BOOST_USE_WINAPI_VERSION=0x0501 stage ``` >其中mt表示多線程,sgd中的s表示runtime 是static,gd表示debug版本。 #### **用`VS2017`編譯** ``` 先設置環境變量 C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.16.27023\\bin\\\Hostx64\\x64\\cl.exe 然后管理員進入vs2017開發人員命令提示符 進入boost源碼目錄 1.56 運行bootstrap.bat 打開生成的文件project-config.jam 修改如下命令 using msvc : 14.0 : "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.16.27023\\bin\\\Hostx64\\x64\\cl.exe"; 執行命令: b2.exe stage --toolset=msvc-14.1 address-model=64 --stagedir="E:\local\boost_1_56_0\VC14.1" threading=multi --build-type=complete --build-dir="E:\local\boost_1_56_0\build" ``` ### **環境二:Centos7.0** ***** **[官網](http://www.boost.org/)下載** 設置編譯器和所選庫 先進入解壓縮后的目錄: ``` $ cd boost_1_58_0 ``` 然后運行bootstrap.sh腳本并設置相關參數: ``` $ ./bootstrap.sh --with-libraries=all --with-toolset=gcc ``` **--with-libraries**指定編譯哪些boost庫,all的話就是全部編譯,只想編譯部分庫的話就把庫的名稱寫上,之間用 , 號分隔即可,可指定的庫有以下幾種: | 庫名字 | 說明 | | --- | --- | | atomic | | | chrono | | | context | | | coroutine | | | date_time | | | exception | | | filesystem | | | graph | 圖組件和算法 | | graph_parallel | | | iostreams | | | locale | | | log | | | math | | | mpi | 用模板實現的元編程框架 | | program_options | | | python | 把C++類和函數映射到Python之中 | | random | | | regex | 正則表達式庫 | | serialization | | | signals | | | system | | | test | | | thread | 可移植的C++多線程庫 | | timer | | | wave | | **--with-toolset** 指定編譯時使用哪種編譯器,Linux下使用gcc即可,如果系統中安裝了多個版本的gcc,在這里可以指定gcc的版本,比如 **--with-toolset=gcc-4.4** 看到下列提示即為成功 ``` Building Boost.Build engine with toolset gcc... tools/build/src/engine/bin.linuxx86_64/b2 Detecting Python version... 2.6 Detecting Python root... /usr Unicode/ICU support for Boost.Regex?... not found. Generating Boost.Build configuration in project-config.jam... Bootstrapping is done. To build, run: ./b2 To adjust configuration, edit 'project-config.jam'. Further information: - Command line help: ./b2 --help - Getting started guide: http://www.boost.org/more/getting_started/unix-variants.html - Boost.Build documentation: http://www.boost.org/build/doc/html/index.html ``` **3.編譯boost** ``` $ ./b2 toolset=gcc ``` 編譯的時間大概要10多分鐘,耐心等待,結束后會有以下提示: ``` ...failed updating 60 targets... ...skipped 21 targets... ...updated 663 targets... ``` 安裝boost 最后執行以下命令開始安裝boost: ``` $ ./b2 install --prefix=/usr ``` --prefix=/usr用來指定boost的安裝目錄,不加此參數的話默認的頭文件在/usr/local/include/boost目錄下,庫文件在/usr/local/lib/目錄下。這里把安裝目錄指定為--prefix=/usr則boost會直接安裝到系統頭文件目錄和庫文件目錄下,可以省略配置環境變量。 安裝完畢后會有以下提示: ``` ...failed updating 60 targets... ...skipped 21 targets... ...updated 11593 targets... ``` 最后需要注意,如果安裝后想馬上使用boost庫進行編譯,還需要執行一下這個命令: ``` //更新一下系統的動態鏈接庫 $ ldconfig ``` ***** ### **環境三:Ubuntu下安裝boost庫** ***** 直接使用 apt-get進行安裝 ``` $ sudo apt-get install libboost-dev $ sudo apt-get install libboost-all-dev $ sudo apt-get install libboost-test-dev ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看