search

Home  >  Q&A  >  body text

c++ - visual studio 2015 update 2链接boost库失败,怎么回事?

昨天用vs做一个人脸识别的实验,其中用到了boost库,我安装了最新的boost_1_61_0,也把包含目录和库目录都添加了boost,但是出现一堆链接错误,LNK2019,LNK2001,有没有熟悉boost的大神给看下.

黄舟黄舟2773 days ago482

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 13:59:20

    You just used the boost header files, but didn’t add the boost libraries to the project configuration. Many boost libraries can directly use header files, but some libraries that are closely related to the system still need to link pre-compiled binary library files.

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 13:59:20

    If you embed the source code, you need to clear the contents of the header file boost/config/auto_link.hpp (not delete the file, but delete the contents).
    Because on the Windows platform, even if you add all the source code but forget to set several environment variables, Boost will try to dynamically link some dll files.

    Without shame, I recommend you to read my blog: Boost library clipping and its application.

    reply
    0
  • Cancelreply