Fatal error LNK1104: cannot open file 'libboost_log-vc141-mt-gd-1_64.lib'

此生再无相见时 提交于 2019-12-10 17:37:07

问题


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 : 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 has been added to "Additional Library Directories" under Linker -> General
  • libboost_log-vc141-mt-gd-1_64.lib is located under stage/lib since when unpacking Boost, I did a complete build with toolset set to 14.1
  • following relevant question's answers, I did add the specific .lib to "Additional Dependencies" under Linker -> Input

I feel like it's something obvious that I am missing. But, any help would be much appreciated.


回答1:


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.

Thank you!



来源:https://stackoverflow.com/questions/44333290/fatal-error-lnk1104-cannot-open-file-libboost-log-vc141-mt-gd-1-64-lib

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!