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