以“libboost_filesystem-VC100-MT-S-1_49.lib”链接错误LNK1104 [英] Linker error LNK1104 with 'libboost_filesystem-vc100-mt-s-1_49.lib'
问题描述
在发布模式我的程序链接到的boost ::文件系统模块的过程中,我得到了一个错误:
During the process of linking my program to the boost::filesystem module in release mode I get the next error:
错误LNK1104:无法打开文件
libboost_filesystem-VC100-MT-S-1_49.lib
error LNK1104: cannot open file 'libboost_filesystem-vc100-mt-s-1_49.lib'
然而,在升压\\台\\ lib目录下我只有在未来图书馆简称文件系统的模块:
However, in the boost\stage\lib directory I only have the next libraries referred to filesystem module:
libboost_filesystem-VC100-MT-1_49.lib
libboost_filesystem-vc100-mt-1_49.lib
libboost_filesystem-VC100-MT-GD-1_49.lib
libboost_filesystem-vc100-mt-gd-1_49.lib
我的问题是:
为什么VC ++是要求'libboost_filesystem-VC100-MT-S-1_49.lib?
Why does the VC++ is asking for 'libboost_filesystem-vc100-mt-s-1_49.lib?
哪个编译器/连接属性应该更改,让编译器索要libboost_filesystem-VC100-MT-1_49.lib?
Which compiler/linking properties should I change to get the compiler to ask for libboost_filesystem-vc100-mt-1_49.lib?
更新:我VC2010 ++解决方案有2个项目,其中包括了previous boost库:x是一个图书馆和y(主程序),它调用为x。
1)当我建立与配置类型=静态库和RuntimeLibrary =多线程(/吨),这是确定的X.
2)当我建立y随配置类型=应用程序文件(.exe)和RuntimeLibrary =多线程(/ MT),它会发出我指出错误,如果我改变配置类型=静态库它建立好了,但是我的主程序是.lib扩展,而不是预期的.exe文件。
谢谢您的关注。
推荐答案
您正在使用/ MT或/ MTD在 C / C ++ / code生成/运行时库$ C $选项C>需要静态库,提升默认构建共享库的输出。您可以
运行时库
切换到/ MD或/ MDD。一个另一种选择是重新编译加强与静态库的输出,你就会得到libboost_filesystem-VC100-MT-S-1_49.lib'..
You are using /MT or /MTd option in C/C++/Code Generation/Runtime Library
which require static library, boost default build with shared library output. You can switch Runtime Library
to /MD or /MDd. An other option is recompile boost with static library output and you'll get 'libboost_filesystem-vc100-mt-s-1_49.lib'..
这篇关于以“libboost_filesystem-VC100-MT-S-1_49.lib”链接错误LNK1104的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!