简体   繁体   中英

.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. Other projects, which reference this library, are automatically change to reference .dll

I'm getting the following error - it seems that the previous .lib configuration is still referenced somewhere. 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. The import library also has a .lib extension, but it's not a static library. This file tells the linker how to find the DLL and import the external symbols at run time.

If you don't have .lib file, you most likely aren't exporting any symbols. You should use __declspec(dllexport) to choose which symbols you want to expose to consumers of your DLL.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM