Ask Your Question
1

What is the method to indicate the external zlib while constructing libboost-iostreams in Visual Studio 2019, using boost version 1.81?

asked 2023-05-21 07:37:00 +0000

devzero gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-05-21 07:49:02 +0000

lalupa gravatar image

To use an external version of zlib while constructing libboost-iostreams in Visual Studio 2019 using Boost version 1.81, you can follow these steps:

  1. Download and install zlib library on your system. Make a note of the zlib installation directory.

  2. Open Visual Studio and create a new project or open an existing project.

  3. Right-click on the project name in the Solution Explorer window and select Properties.

  4. In the left pane of the project properties popup window, navigate to Configuration Properties > C/C++ > General.

  5. In the right pane, scroll down to Additional Include Directories and click on the value field.

  6. Click the down arrow at the end of the value field and select Edit.

  7. In the Edit dialogue box, add the path of the zlib include directory (which contains the header files) that you noted earlier.

  8. Click on OK to save the changes and close the Edit dialogue box.

  9. Now in the left pane of the same window, navigate to Configuration Properties > Linker > General.

  10. In the right pane, scroll down to Additional Library Directories and click on the value field.

  11. Click the down arrow at the end of the value field and select Edit.

  12. In the Edit dialogue box, add the path of the zlib lib directory (which contains the library files) that you noted earlier.

  13. Click on OK to save the changes and close the Edit dialogue box.

  14. Now, in the left pane of the same window, navigate to Configuration Properties > Linker > Input.

  15. In the right pane, scroll down to Additional Dependencies and click on the value field.

  16. Click the down arrow at the end of the value field and select Edit.

  17. In the Edit dialogue box, add the following libraries with a semicolon separator:

zlib.lib

boostiostreams-vc141-mt-s-x32-x64-181.lib

Note: The name of the boost_iostreams library may vary depending on your Boost version, architecture (32-bit or 64-bit), and configuration (static or dynamic).

  1. Click on OK to save the changes and close the Edit dialogue box and then click on OK to close the project properties window.

Now, you can build and run your project with external zlib library support.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-05-21 07:37:00 +0000

Seen: 16 times

Last updated: May 21 '23