致命错误LNK1104:无法打开文件'libboost_log-vc141-mt-gd-1_64.lib' [英] Fatal error LNK1104: cannot open file 'libboost_log-vc141-mt-gd-1_64.lib'
问题描述
我正在编写一个利用Boost日志记录功能的程序,因此,当尝试构建该程序时,在生成代码时(在Visual Studio 2017上)出现以下错误:
I'm writing a program which utilizes Boost logging features and consequently, when attempting to build the said program, I'm getting the following error when generating code (on Visual Studio 2017):
1> LINK:致命错误LNK1104:无法打开文件'libboost_log-vc141-mt-gd-1_64.lib'
1>LINK : fatal error LNK1104: cannot open file 'libboost_log-vc141-mt-gd-1_64.lib'
但是,我可以确认以下内容:
However, I can confirm the following:
- boost_1_64_0 \ stage \ lib已添加到链接器->常规下的其他库目录"中
- libboost_log-vc141-mt-gd-1_64.lib位于stage/lib下,因为在解压缩Boost时,我使用工具集设置为14.1进行了完整构建
- 按照相关问题的答案,我确实将特定的.lib添加到链接器->输入下的其他依赖项"中
我觉得很明显我很想念.但是,任何帮助将不胜感激.
I feel like it's something obvious that I am missing. But, any help would be much appreciated.
推荐答案
drescherjm 是正确的,我将32和64位.需要将项目配置属性->链接器->高级下的目标计算机更改为 MACHINEX86 ,并且它起作用.
drescherjm was correct, I was mixing 32 and 64 bit. Needed to change Target Machine under Project Configuration Properties -> Linker -> Advanced to MACHINEX86 and it worked.
谢谢!
这篇关于致命错误LNK1104:无法打开文件'libboost_log-vc141-mt-gd-1_64.lib'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!