How to link Boost in a dependent static library

前端 未结 3 1892
野趣味
野趣味 2020-12-08 15:28

In MS Visual C++ 2010

I had a single C++ project in my solution which used boost and worked perfectly.

I then decided to convert this project into a static

3条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-08 16:00

    When building your library, you can include the boost libraries in yours. To do so, in VisualStudio's Librarian > General property page, list your boost libraries as Additional Dependencies.

    However, there may be a problem if your clients use boost themselves, and statically link to it (especially a different version than the one you are using).

提交回复
热议问题