fatal error LNK1104: cannot open file 'libboost_system-vc90-mt-gd-1_43.lib'

后端 未结 7 974
既然无缘
既然无缘 2020-12-13 07:04

Made a new project, added main.cpp and wrote the code at this URL:

http://www.boost.org/doc/libs/1_43_0/doc/html/boost_asio/example/echo/async_tcp_echo_server.cpp

相关标签:
7条回答
  • 2020-12-13 07:36

    @bogertron: I want to hug you! (:

    So, at last, with a real head ache, I've managed to do so.

    The exact steps I took, so others will be saved from the head ache:

    1. Went to http://www.boost.org/doc/libs/1_43_0/more/getting_started/windows.html#or-build-binaries-from-source .

    2. Followed the "5.3.1 Get bjam" clause. Downloaded the "pre-built bjam executable for your platform" at this URL: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=72941 .

    3. Extracted the ZIP file (my platform is Windows).

    4. Ran "build.bat". It produced the file "bin.ntx86/bjam.exe".

    5. Copied this file to my PATH ("...../boost_1_43_0/").

    6. From a command line, executed "bjam.exe" and waited for about 4-5 minutes.

    Then got this message at the console: "The Boost C++ Libraries were successfully built!"

    That's it, it even tells you where the include & lib files are.

    0 讨论(0)
  • 2020-12-13 07:37

    Not all Boost libraries are header only, Boost.System is one of them. The documentation for Boost.Asio tells you that it depends on Boost.System.

    With Visual Studio, the Boost libraries use auto-linking, which means you don't have to explicitly link to the libraries you need. You however need to have the necessary libraries in the library search path, either globally or per-project.

    If you don't want to build the Boost libraries yourself, you can use the installers provided by boostpro (only up to Boost 1.42 though at the moment). If you want to build them yourself instead, the documentation covers that well.

    0 讨论(0)
  • 2020-12-13 07:40

    From the "Boost Getting Started Directions":

    "5.2 Or, Simplified Build From Source

    If you wish to build from source with Visual C++, you can use a simple build procedure described in this section. Open the command prompt and change your current directory to the Boost root directory. Then, type the following commands:

    bootstrap .\b2"

    On Windows, I opened the Visual Studio Command Line from the start menu. First I types "bootstrap" and then I typed ".\b2".

    0 讨论(0)
  • 2020-12-13 07:42

    You need to use bjam. It is responsible for creating the libraries that your application will use. Once you use bjam, you are going to need to instruct your project to include the lib file. You do this by going into the project's properties -> Configuration Properties -> Linker -> General. Add the directory which created the lib file to Additional Library Directories. You should be capable of correctly linking after that. I believe that this link describes the steps better than I could attempt in a post

    0 讨论(0)
  • 2020-12-13 07:44

    Now with boost_1.50 the Boost.build is included in the zip file: check tools\build\v2\ or better read: ...boost_1_50_0/more/getting_started/windows.html

    0 讨论(0)
  • 2020-12-13 07:47

    I had the same error and i followed the SourceForge. The link will take you to a folder of zipped lib and dll files for version of boost.You can download and unzip related library and when copied it to the related location everything gonna be alright ;)

    0 讨论(0)
提交回复
热议问题