开发者

How to set Visual Studio to work with only lib files?

开发者 https://www.devze.com 2023-01-23 21:24 出处:网络
so I have a Win32 consol project using librar开发者_如何转开发ies like openCV and FFmpeg (builds).

so I have a Win32 consol project using librar开发者_如何转开发ies like openCV and FFmpeg (builds). I have DLLs, .Libs, heders for tham all. How to set visual studio project not to use DLLs but only lib files?


I assume you are talking about static libs and not using DLLs. If you have a dependency on static libs do this

Right click on your project -> Properties -> Linker -> General -> Additional Library Dependencies Specify your library directories. Right click on your project -> Properties -> Linker -> Input -> Additional Dependencies. Specify your static lib file names.

If any of you library isn't static library then you would need the dll to run your project.


Well it depends if the .lib files are static libraries or import libraries for the DLL. If they're import libraries, you have no choice, you're program will have to be dynamically linked with the DLLs. If they're static libraries, than just add them to your project. You can add them under project settings->configuration properties->linker->input->additional dependencies, drag and drop them into your project, or use the preprocessor directive #pragma comment(lib, <libname>)

0

精彩评论

暂无评论...
验证码 换一张
取 消