opencv_world.dll - how to use .lib ?
I compiled opencv from source using cmake gui and visual studio and selected the option to create the opencv_world files. When I run my code it tells me that opencv_world300.dll is missing and so I put it in my project folder. Will my code run slower because I am using a .dll file instead of a .lib file ? I am building a real-time application so it is important that I do not use settings or files that make my code run slower.
Should I reinstall OpenCV and not select the opencv_world option ? Because when I did that long ago it never gives me any missing dll errors.
"Will my code run slower because I am using a .dll file instead of a .lib file ? " -- this is entirely unrelated. where did you get such an idea ?
i always read that dynamically linked libraries take a longer run time compared to static libraries ? If this isnt true then I guess I should just stick to the dlls ?
It sounds like you're using the lib and the DLL at the same time.
See, you could use the lib, or use function pointers and GetProcAddress(), to access the functions in the DLL. Try both and see what difference it makes, if any.
how do i use the lib only ?
If it's possible, it would be done through compiling the lib yourself from the OpenCV source code.
Do you know the difference between a regular function and an inline function? Is that the kind of difference in performance that you're looking for... no function call overhead?
That would require that you build the OpenCV sources into your main Visual Studio project/solution, and that you mark the functions as inline (using the inline keyword or __forceinline keyword). Basically you'd end up with a gigantic EXE file that contains OpenCV's hundreds of functions. Not only that, the functions that are called are inlined (duplicated, if you may), which makes the EXE even bigger.
@berak and @Nbb. Used Visual Studio, Unix, C++, perl, fortran, etc Lib can be convert into dll.
@sjhalayka. The OpenCV can created inside Visual Studio to make Dll. You can used any Unix, perl fortran etc