国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

Visual Studio 2019安裝boost 1.7.0庫

這篇具有很好參考價(jià)值的文章主要介紹了Visual Studio 2019安裝boost 1.7.0庫。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。

小結(jié)

在Visual Studio 2019使用了boost 1.7.0庫,經(jīng)過編譯boost 1.7.0庫,再添加配置到VS 2019工程中,進(jìn)行了成功地測(cè)試。

問題

找不到boost的源文件

如果沒有安裝boost庫,會(huì)在Visual Studio 2019的工程編譯過程中找不到相應(yīng)的源文件。
參見C++ problem: boost/asio.hpp non existing

boost庫的版本問題

如果boost庫的安裝版本不對(duì)的話,會(huì)返回類似c2664 cannot convert executor to any_io_executor &的錯(cuò)誤,參見Compiler Error C2664 , 這里我的情況是安裝的boost庫過高,安裝了boost 1.7.9的庫,原因不確定,但是安裝低一點(diǎn)的版本boost 1.7.0庫,這個(gè)問題就沒有了。

也有安裝的版本過低的情況,也是有問題。返回類似LINK : fatal error LNK1104: cannot open file 'libboost_filesystem-vc141-mt-gd-x32-1_66.lib'的問題。

參見:
fatal error LNK1104: cannot open file ‘libboost_system-vc110-mt-gd-1_51.lib’

boost 1.7.0庫的安裝

參見https://www.boost.org/users/history/version_1_70_0.html,下載boost 1.7.0庫Windows Zip文件,解壓縮。

參見fatal error LNK1104: cannot open file 'libboost_system-vc110-mt-gd-1_51.lib’的過程進(jìn)行安裝。

首先需要執(zhí)行以下VsDevCmd.bat指令,啟動(dòng)Visual Studio 2019 Developer Command Prompt v16.11.17。

C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\Tools>VsDevCmd.bat
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.11.17
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************

否則會(huì)出現(xiàn)以下錯(cuò)誤,
'cl' is not recognized as an internal or external command, operable program or batch file
和以下錯(cuò)誤:
fatal error C1034: ctype.h: no include path set

參考Building Boost.Build engine ‘cl’ is not recognized as an internal or external command, operable program or batch file
how to install boost correctly
Error “fatal error C1034: windows.h: no include path set”

再執(zhí)行bootstrap.bat

C:\boost_1_70_0>bootstrap.bat
Building Boost.Build engine

Generating Boost.Build configuration in project-config.jam for msvc...

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://boost.org/more/getting_started/windows.html

    - Boost.Build documentation:
    http://www.boost.org/build/

接著執(zhí)行b2,生成library文件:

C:\boost_1_70_0>.\b2
Performing configuration checks

    - default address-model    : 32-bit
    - default architecture     : x86

Building the Boost C++ Libraries.


    - C++11 mutex              : yes
    - Boost.Config Feature Check: cxx11_auto_declarations : yes
    - Boost.Config Feature Check: cxx11_constexpr : yes
    - Boost.Config Feature Check: cxx11_defaulted_functions : yes
    - Boost.Config Feature Check: cxx11_final : yes
    - Boost.Config Feature Check: cxx11_hdr_mutex : yes
    - Boost.Config Feature Check: cxx11_hdr_tuple : yes
    - Boost.Config Feature Check: cxx11_lambdas : yes
    - Boost.Config Feature Check: cxx11_noexcept : yes
    - Boost.Config Feature Check: cxx11_nullptr : yes
    - Boost.Config Feature Check: cxx11_rvalue_references : yes
    - Boost.Config Feature Check: cxx11_template_aliases : yes
    - Boost.Config Feature Check: cxx11_thread_local : yes
    - Boost.Config Feature Check: cxx11_variadic_templates : yes
    - has_icu builds           : no
warning: Graph library does not contain MPI-based parallel components.
note: to enable them, add "using mpi ;" to your user-config.jam
    - zlib                     : no
    - bzip2                    : no
    - lzma                     : no
    - zstd                     : no
    - iconv (libc)             : no
    - iconv (separate)         : no
    - icu                      : no
    - icu (lib64)              : no
    - native-atomic-int32-supported : yes
    - message-compiler         : yes
    - native-syslog-supported  : no
    - pthread-supports-robust-mutexes : no
    - compiler-supports-ssse3  : yes
    - compiler-supports-avx2   : yes
    - gcc visibility           : no
    - long double support      : yes
warning: skipping optional Message Passing Interface (MPI) library.
note: to enable MPI support, add "using mpi ;" to user-config.jam.
note: to suppress this message, pass "--without-mpi" to bjam.
note: otherwise, you can safely ignore this message.
    - libbacktrace builds      : no
    - addr2line builds         : no
    - WinDbg builds            : yes
    - WinDbgCached builds      : yes
    - BOOST_COMP_GNUC >= 4.3.0 : no
    - zlib                     : no  (cached)
    - bzip2                    : no  (cached)
    - lzma                     : no  (cached)
    - zstd                     : no  (cached)
    - C++11 mutex              : yes
    - Boost.Config Feature Check: cxx11_auto_declarations : yes
    - Boost.Config Feature Check: cxx11_constexpr : yes
    - Boost.Config Feature Check: cxx11_defaulted_functions : yes
    - Boost.Config Feature Check: cxx11_final : yes
    - Boost.Config Feature Check: cxx11_hdr_mutex : yes
    - Boost.Config Feature Check: cxx11_hdr_tuple : yes
    - Boost.Config Feature Check: cxx11_lambdas : yes
    - Boost.Config Feature Check: cxx11_noexcept : yes
    - Boost.Config Feature Check: cxx11_nullptr : yes
    - Boost.Config Feature Check: cxx11_rvalue_references : yes
    - Boost.Config Feature Check: cxx11_template_aliases : yes
    - Boost.Config Feature Check: cxx11_thread_local : yes
    - Boost.Config Feature Check: cxx11_variadic_templates : yes
    - has_icu builds           : no
    - zlib                     : no
    - bzip2                    : no
    - lzma                     : no
    - zstd                     : no
    - iconv (libc)             : no
    - iconv (separate)         : no
    - icu                      : no
    - icu (lib64)              : no
    - native-atomic-int32-supported : yes
    - message-compiler         : yes
    - native-syslog-supported  : no
    - pthread-supports-robust-mutexes : no
    - compiler-supports-ssse3  : yes
    - compiler-supports-avx2   : yes
    - gcc visibility           : no
    - long double support      : yes
    - libbacktrace builds      : no
    - addr2line builds         : no
    - WinDbg builds            : yes
    - WinDbgCached builds      : yes
    - BOOST_COMP_GNUC >= 4.3.0 : no
    - zlib                     : no  (cached)
    - bzip2                    : no  (cached)
    - lzma                     : no  (cached)
    - zstd                     : no  (cached)

Component configuration:

    - atomic                   : building
    - chrono                   : building
    - container                : building
    - context                  : building
    - contract                 : building
    - coroutine                : building
    - date_time                : building
    - exception                : building
    - fiber                    : building
    - filesystem               : building
    - graph                    : building
    - graph_parallel           : building
    - headers                  : building
    - iostreams                : building
    - locale                   : building
    - log                      : building
    - math                     : building
    - mpi                      : building
    - program_options          : building
    - python                   : building
    - random                   : building
    - regex                    : building
    - serialization            : building
    - stacktrace               : building
    - system                   : building
    - test                     : building
    - thread                   : building
    - timer                    : building
    - type_erasure             : building
    - wave                     : building

...patience...
...patience...
...patience...
...patience...
...patience...
...found 26874 targets...
...updating 2407 targets...
compile-c-c++ bin.v2\libs\python\build\msvc-14.2\debug\link-static\python-3.7\threading-multi\list.obj
list.cpp
...
...
...
中間過程省略,趕時(shí)間比較久,大概要半個(gè)小時(shí)。。。
...
...
...updated 2407 targets...


The Boost C++ Libraries were successfully built!

The following directory should be added to compiler include paths:

    C:\boost_1_70_0

The following directory should be added to linker library paths:

    C:\boost_1_70_0\stage\lib


接著執(zhí)行bjam.exe

C:\boost_1_70_0>bjam.exe
Performing configuration checks

    - default address-model    : 32-bit (cached)
    - default architecture     : x86 (cached)

Building the Boost C++ Libraries.


    - C++11 mutex              : yes (cached)
    - Boost.Config Feature Check: cxx11_auto_declarations : yes (cached)
    - Boost.Config Feature Check: cxx11_constexpr : yes (cached)
    - Boost.Config Feature Check: cxx11_defaulted_functions : yes (cached)
    - Boost.Config Feature Check: cxx11_final : yes (cached)
    - Boost.Config Feature Check: cxx11_hdr_mutex : yes (cached)
    - Boost.Config Feature Check: cxx11_hdr_tuple : yes (cached)
    - Boost.Config Feature Check: cxx11_lambdas : yes (cached)
    - Boost.Config Feature Check: cxx11_noexcept : yes (cached)
    - Boost.Config Feature Check: cxx11_nullptr : yes (cached)
    - Boost.Config Feature Check: cxx11_rvalue_references : yes (cached)
    - Boost.Config Feature Check: cxx11_template_aliases : yes (cached)
    - Boost.Config Feature Check: cxx11_thread_local : yes (cached)
    - Boost.Config Feature Check: cxx11_variadic_templates : yes (cached)
    - has_icu builds           : no  (cached)
warning: Graph library does not contain MPI-based parallel components.
note: to enable them, add "using mpi ;" to your user-config.jam
    - zlib                     : no  (cached)
    - bzip2                    : no  (cached)
    - lzma                     : no  (cached)
    - zstd                     : no  (cached)
    - iconv (libc)             : no  (cached)
    - iconv (separate)         : no  (cached)
    - icu                      : no  (cached)
    - icu (lib64)              : no  (cached)
    - native-atomic-int32-supported : yes (cached)
    - message-compiler         : yes (cached)
    - native-syslog-supported  : no  (cached)
    - pthread-supports-robust-mutexes : no  (cached)
    - compiler-supports-ssse3  : yes (cached)
    - compiler-supports-avx2   : yes (cached)
    - gcc visibility           : no  (cached)
    - long double support      : yes (cached)
warning: skipping optional Message Passing Interface (MPI) library.
note: to enable MPI support, add "using mpi ;" to user-config.jam.
note: to suppress this message, pass "--without-mpi" to bjam.
note: otherwise, you can safely ignore this message.
    - libbacktrace builds      : no  (cached)
    - addr2line builds         : no  (cached)
    - WinDbg builds            : yes (cached)
    - WinDbgCached builds      : yes (cached)
    - BOOST_COMP_GNUC >= 4.3.0 : no  (cached)
    - zlib                     : no  (cached)
    - bzip2                    : no  (cached)
    - lzma                     : no  (cached)
    - zstd                     : no  (cached)
    - C++11 mutex              : yes (cached)
    - Boost.Config Feature Check: cxx11_auto_declarations : yes (cached)
    - Boost.Config Feature Check: cxx11_constexpr : yes (cached)
    - Boost.Config Feature Check: cxx11_defaulted_functions : yes (cached)
    - Boost.Config Feature Check: cxx11_final : yes (cached)
    - Boost.Config Feature Check: cxx11_hdr_mutex : yes (cached)
    - Boost.Config Feature Check: cxx11_hdr_tuple : yes (cached)
    - Boost.Config Feature Check: cxx11_lambdas : yes (cached)
    - Boost.Config Feature Check: cxx11_noexcept : yes (cached)
    - Boost.Config Feature Check: cxx11_nullptr : yes (cached)
    - Boost.Config Feature Check: cxx11_rvalue_references : yes (cached)
    - Boost.Config Feature Check: cxx11_template_aliases : yes (cached)
    - Boost.Config Feature Check: cxx11_thread_local : yes (cached)
    - Boost.Config Feature Check: cxx11_variadic_templates : yes (cached)
    - has_icu builds           : no  (cached)
    - zlib                     : no  (cached)
    - bzip2                    : no  (cached)
    - lzma                     : no  (cached)
    - zstd                     : no  (cached)
    - iconv (libc)             : no  (cached)
    - iconv (separate)         : no  (cached)
    - icu                      : no  (cached)
    - icu (lib64)              : no  (cached)
    - native-atomic-int32-supported : yes (cached)
    - message-compiler         : yes (cached)
    - native-syslog-supported  : no  (cached)
    - pthread-supports-robust-mutexes : no  (cached)
    - compiler-supports-ssse3  : yes (cached)
    - compiler-supports-avx2   : yes (cached)
    - gcc visibility           : no  (cached)
    - long double support      : yes (cached)
    - libbacktrace builds      : no  (cached)
    - addr2line builds         : no  (cached)
    - WinDbg builds            : yes (cached)
    - WinDbgCached builds      : yes (cached)
    - BOOST_COMP_GNUC >= 4.3.0 : no  (cached)
    - zlib                     : no  (cached)
    - bzip2                    : no  (cached)
    - lzma                     : no  (cached)
    - zstd                     : no  (cached)

Component configuration:

    - atomic                   : building
    - chrono                   : building
    - container                : building
    - context                  : building
    - contract                 : building
    - coroutine                : building
    - date_time                : building
    - exception                : building
    - fiber                    : building
    - filesystem               : building
    - graph                    : building
    - graph_parallel           : building
    - headers                  : building
    - iostreams                : building
    - locale                   : building
    - log                      : building
    - math                     : building
    - mpi                      : building
    - program_options          : building
    - python                   : building
    - random                   : building
    - regex                    : building
    - serialization            : building
    - stacktrace               : building
    - system                   : building
    - test                     : building
    - thread                   : building
    - timer                    : building
    - type_erasure             : building
    - wave                     : building

...patience...
...patience...
...patience...
...patience...
...patience...
...patience...
...found 27172 targets...


The Boost C++ Libraries were successfully built!

The following directory should be added to compiler include paths:

    C:\boost_1_70_0

The following directory should be added to linker library paths:

    C:\boost_1_70_0\stage\lib

需要添加C:\boost_1_70_0C:\boost_1_70_0\stage\lib到VS 2019工程文件中。

添加boost 1.7.0庫到VS 2019工程

進(jìn)行以下設(shè)置:

  • Configuration Properties > C/C++ > Precompiled Headers. 設(shè)置Not Using Precompiled Headers(不知道這個(gè)有沒有用)

  • Set the “General > Platform Toolset” to Visual Studio 2019 (v142).

  • 設(shè)置"General > C Language Standard" to ISO C11 Standard (/std:c11) (不知道這個(gè)有沒有用)

  • Include the path to the boost folder (e.g. C:\boost_1_70_0) and the path to the subfolder containing the binary files (e.g. C:\boost_1_70_0\stage\lib) in:“C\C++ > Additional Include Directory” and “Linker > Additional Library Directories”.

編譯問題

參見Why does Visual Studio 2013 error on C4996?, 對(duì)于C4996的問題,進(jìn)行以下設(shè)置解決:
Apparently new projects enable “SDK check” by default now, which treats these warnings as errors. To disable it, go to project properties -> Configuration Properties -> C/C++ -> General -> SDL checks -> No.

參考

vs2015 安裝boost庫
C++ problem: boost/asio.hpp non existing
https://www.boost.org/users/history/version_1_70_0.html
How to add boost library 1_65 or 1_64 to Visual Studio 2017 project?
Compiler Error C2664
Why does Visual Studio 2013 error on C4996?
Having problems with Boost library and Visual Studio (C++)
fatal error LNK1104: cannot open file ‘libboost_system-vc110-mt-gd-1_51.lib’
Building Boost.Build engine ‘cl’ is not recognized as an internal or external command, operable program or batch file
how to install boost correctly
Error “fatal error C1034: windows.h: no include path set”文章來源地址http://www.zghlxwxcb.cn/news/detail-485819.html

到了這里,關(guān)于Visual Studio 2019安裝boost 1.7.0庫的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • Visual Studio 2019安裝打包工具使用教程

    Visual Studio 2019安裝打包工具使用教程

    打開Visual Studio 2019,工具 -- 擴(kuò)展和更新 -- 聯(lián)機(jī) -- 搜索 -- Microsoft Visual Studio Installer Projects --下載 關(guān)閉Microsoft Visual Studio,彈出VSIX Installer窗口中,點(diǎn)擊“修改”或“Modify”后進(jìn)行安裝 注意:這里Microsoft Visual Studio若還在運(yùn)行,則會(huì)提示關(guān)掉后才可以修改(若找不到對(duì)應(yīng)的,在

    2024年02月07日
    瀏覽(32)
  • Visual Studio 2019 詳細(xì)安裝教程(圖文版)

    Visual Studio 2019 詳細(xì)安裝教程(圖文版)

    Visual Studio 2019 安裝包的下載教程、安裝教程 教程 博主博客鏈接:https://blog.csdn.net/m0_74014525 關(guān)注博主,后期持續(xù)更新系列文章 ********文章附有百度網(wǎng)盤安裝包鏈接********* 第一篇:Visual Studio 2019 詳細(xì)安裝教程(圖文版) 第二篇:Visual Studio 2019 實(shí)用功能設(shè)置(背景顏色,代碼

    2024年02月08日
    瀏覽(20)
  • (二)Visual Studio 2019安裝.Net 5

    (二)Visual Studio 2019安裝.Net 5

    最開始我用的.Net core 3.1版本去寫項(xiàng)目,寫到一半發(fā)現(xiàn),我要引用一個(gè)NuGet包,然后報(bào)錯(cuò)說只支持.Net 5.0版本。 那時(shí)我就好奇.Net core和.Net 之間的區(qū)別,好家伙,網(wǎng)上一大堆,然后我get不到他們的意思,我當(dāng)時(shí)完全是腦子糊掉了狀態(tài)。后面也是去找Net的歷史才知道,可以看看我

    2023年04月08日
    瀏覽(19)
  • Visual Studio 2019離線安裝包獲取和安裝教程

    Visual Studio 2019離線安裝包獲取和安裝教程

    摘要 介紹Visual Studio 2019離線安裝方法和配置及注意事項(xiàng) VS2019 離線安裝 Visual Studio 2019版本與以往的2015、2013、2012版本不同,采用了新的模塊化安裝方法。微軟官方也并未提供ISO鏡像,根據(jù)官方提供的離線下載方案(docs.microsoft.com/en-us/visua… Studio的脫機(jī)安裝說明。 一、

    2024年02月05日
    瀏覽(23)
  • visual studio 2019安裝Nsight無菜單項(xiàng)

    visual studio 2019 community版 nsight visual studio edition 最新版(2022.1)安裝后無法找到nsight的菜單 解決的辦法: 到這個(gè)連接去下載 Nsight Developer Tools Integration, 或者從vs 2019的擴(kuò)展菜單里找到在線搜索nsight安裝,然后就可以在擴(kuò)展里面看到了。 https://marketplace.visualstudio.com/items?itemNa

    2024年02月08日
    瀏覽(37)
  • 你好visual studio 2019:關(guān)于vs2019的安裝和疑難雜癥

    你好visual studio 2019:關(guān)于vs2019的安裝和疑難雜癥

    目錄 一.Visual Studio 2019安裝方法 二.Visual Studio 2019的基礎(chǔ)操作 ①.新建項(xiàng)目 ②.調(diào)整Visual Studio 主題顏色 ③.調(diào)整Visual Studio 字體 ④.Visual Studio 字體選擇 三.關(guān)于#define_CRT_SECURE_NO_WARNINGS問? 1.首先打開window自帶的Microsoft Store Microsoft Store 也就是俗稱的微軟商城。 2.在Microsoft Store的搜

    2024年02月10日
    瀏覽(24)
  • Visual Studio 2019安裝vsix插件及Gitee.VisualStudio安裝包

    Visual Studio 2019安裝vsix插件及Gitee.VisualStudio安裝包

    網(wǎng)上安裝 Gitee.VisualStudio插件 速度較慢,可以從百度網(wǎng)盤下載 鏈接:https://pan.baidu.com/s/16WLjWHMTMUSRfyt_SKxFWA?pwd=74cd 提取碼:74cd 下載成功之后,是一個(gè)后綴名為vsix的文件 win+R打開運(yùn)行,輸入“cmd” 如果Visual Studio 2019是裝在別的盤里,那么需要先切換路徑,我是裝在了D盤,步驟

    2024年02月11日
    瀏覽(46)
  • Visual Studio 2019 安裝教程 & 安裝后繼續(xù)安裝其它模塊組件功能擴(kuò)展包

    Visual Studio 2019 安裝教程 & 安裝后繼續(xù)安裝其它模塊組件功能擴(kuò)展包

    Visual Studio分為社區(qū)版、專業(yè)版、企業(yè)版,3個(gè)版本,社區(qū)版無需激活碼?? Visual Studio 2019 下載地址 https://my.visualstudio.com/Downloads?q=Visual%20Studio%202019 Visual Studio 2019 Enterprise(企業(yè)版)?序列號(hào)/激活碼 BF8Y8-GN2QH-T84XB-QV

    2024年02月06日
    瀏覽(26)
  • MySQL msi安裝缺少‘Microsoft Visual Studio 2019 Redistributable’

    下載好msi文件運(yùn)行報(bào)錯(cuò),提示未安裝‘Microsoft Visual Studio 2019 Redistributable’ 點(diǎn)擊這里 點(diǎn)擊最底部: Other Tools and Frameworks 一欄, 下載 Microsoft Visual C++ Redistributable for Visual Studio 2019 并安裝,重啟電腦后再運(yùn)行MySQL安裝程序即可。

    2024年02月13日
    瀏覽(23)
  • 【UE4 C++】01-Visual Studio 2019社區(qū)版安裝

    【UE4 C++】01-Visual Studio 2019社區(qū)版安裝

    目錄 步驟 一、下載安裝包 二、安裝? 一、下載安裝包 官網(wǎng)目前Visual Studio是2022版本,我們需要下載Visual Studio老版本: Visual Studio 較舊的下載 - 2019、2017、2015 和以前的版本 ? 二、安裝? 雙擊運(yùn)行安裝包后,在打開的界面勾選“使用C++的桌面開發(fā)” ?勾選“使用C++的游戲開發(fā)

    2024年02月13日
    瀏覽(27)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包