Where do I input DLL dependencies in Visual Studio C++ project?

可紊 提交于 2021-01-27 03:51:04

问题


I am converting some Qt project files (.pro) that run on Linux and Mac into Visual Studio project files (.vcproj) The Qt Visual Studio add-in converted everything fine except the DLL dependencies. Where do I put these in Visual Studio 2008?

If I put the DLLs in Configuration Properties > Linker > Input > Additional Dependencies, I get:

fatal error LNK1107: invalid or corrupt file: cannot read at 0xABC

Where do dynamically-linked dependencies go?


回答1:


You might want to check what’s the differences between .dll , .lib, .h files ?.

You need to specify the corresponding .lib file at link time. not the dll.




回答2:


Project Properties -> Linker -> Input -> Additional Dependencies

In that field put xxxx.lib for whatever library you need.



来源:https://stackoverflow.com/questions/2967667/where-do-i-input-dll-dependencies-in-visual-studio-c-project

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