Adding a .lib file to a project in Visual Studio 2015 [duplicate]

流过昼夜 提交于 2019-12-03 06:18:47

问题


I have generated a .lib file from another project that I would like to use in my project. I have added the file to LinkerInputAdditional dependencies as bluetoothserialport.lib.

I've added the lib file inside my project at this level: http://i65.tinypic.com/1t9fki.jpg

However I get the following error:

1>LINK : fatal error LNK1104: cannot open file 'bluetoothserialport.lib'

I am using Windows 10 and C++.


回答1:


If you come from an Xcode background you might expect a reasonable IDE to know what all the things in a project are. Visual Studio is not such an IDE.

You need to, explicitly, go to the LinkerGeneralAdditional Library Directories, and add a path to your .lib there.



来源:https://stackoverflow.com/questions/36785220/adding-a-lib-file-to-a-project-in-visual-studio-2015

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