Boost::Archive 导致奇怪的链接器错误
有谁知道为什么这两行会导致链接器错误?
std::ifstream ifs("filename.file");
boost::archive::binary_iarchive iarchv( ifs );
错误8致命错误LNK1104:无法打开文件
'F:\dev\project\build\win32-unit\tests\Debug\framework_core_tests.lib'
ramework_core_tests
<代码>framework_core_tests
发生同样的情况。
由于某种原因,当该项目不存在或从未存在并且未定义为要在我的项目文件中链接的库时,它会尝试链接与我的可执行文件同名的库。
Does anyone have a clue why those two lines would cause that linker error?
std::ifstream ifs("filename.file");
boost::archive::binary_iarchive iarchv( ifs );
Error 8 fatal error LNK1104: cannot open file
'F:\dev\project\build\win32-unit\tests\Debug\framework_core_tests.lib'
ramework_core_tests
framework_core_tests
The same happens with any Boost::Archive type.
Its trying to link against a library of the same name as my executable for some reason when that project doesn't nor never existed and is not defined as a library to link against in my project files.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
也许您应该添加对包含该函数的库的引用?
maybe you should add a reference to a lib that contains that functions?
您已经通过核心测试编译了这个库。
You have compiled this library with core tests.