如何在将boost连接到visual studio时纠正错误 [英] How do I rectify the error while linking boost to visual studio

查看:91
本文介绍了如何在将boost连接到visual studio时纠正错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我下载了boost库1.55和i bootstrap,并通过包含库路径和其他include目录将其链接到visual studio 2012。当我编译我的项目时,我有一个错误,因为'无法打开libboost_serialization-vc110-mt-gd-1_54.lib'。我不知道我哪里出错了?。

i downloaded boost library 1.55 and i bootstrap and i linked that to visual studio 2012 by including library path and additional include directory. while i compile my project i have an error as ' cannot open libboost_serialization-vc110-mt-gd-1_54.lib'. i dont know where i have gone wrong?.

推荐答案

虽然图书馆是头文件但听起来像你。可能你配置了它们的路径,所以编译器很满意你。

但不,主库内容是对象和库文件,而不是头文件。您需要引用要排列到链接器的所有文件,所有* .obj和* .lib文件。此外,您可能需要了解构建更好的内容,特别是:

http:// en。 wikipedia.org/wiki/Compiler [ ^ ],

http://en.wikipedia.org/wiki/Linker_%28computing%29 [ ^ ]。



-SA
It sounds like you though that the library is the header files. Probably you configured the path to them, so the compiler is happy with you.
But no, the main library content is object and library file, not header files. You need to reference all files you want to line to the linker, all you *.obj and *.lib files. Besides, you probably need to understand what the build does better, in particular:
http://en.wikipedia.org/wiki/Compiler[^],
http://en.wikipedia.org/wiki/Linker_%28computing%29[^].

—SA


这篇关于如何在将boost连接到visual studio时纠正错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆