[英].lib file is still referenced when project type is changed to dll
In VS 2013 (C++) in multi-project solution I've changed the type of one project from .lib to .dll. 在多项目解决方案的VS 2013(C ++)中,我将一个项目的类型从.lib更改为.dll。 Other projects, which reference this library, are automatically change to reference .dll
引用此库的其他项目将自动更改为引用.dll
I'm getting the following error - it seems that the previous .lib configuration is still referenced somewhere. 我收到以下错误-似乎以前的.lib配置仍在某处引用。 Any thoughts how to fix this?
有什么想法如何解决这个问题?
Error 283 error LNK1104: cannot open file 'C..\x64\Debug\File.lib' in '..\Project1\LINK
By default, Visual Studio generates an import library when you compile to a DLL. 默认情况下,Visual Studio在编译为DLL时会生成一个导入库。 The import library also has a
.lib
extension, but it's not a static library. 导入库还具有
.lib
扩展名,但它不是静态库。 This file tells the linker how to find the DLL and import the external symbols at run time. 该文件告诉链接器如何在运行时查找DLL并导入外部符号。
If you don't have .lib
file, you most likely aren't exporting any symbols. 如果您没有
.lib
文件,则很可能不会导出任何符号。 You should use __declspec(dllexport)
to choose which symbols you want to expose to consumers of your DLL. 您应该使用
__declspec(dllexport)
选择要公开给DLL使用者的符号。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.