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>)
精彩评论