Ask Your Question

mbsp's profile - activity

2019-03-18 02:17:10 -0500 received badge  Popular Question (source)
2013-10-25 21:05:32 -0500 answered a question Static Linking still expects dll

After some searching I found the answer:

Back to my points:

  1. is OK
  2. you have to take "...\opencv\build\x86\vc10\STATIClib" as additional lib folder. The files there are much more greater than in the lib folder -> because of static linking!
  3. as said + IlmImfd.lib, libjasperd.lib, libjpegd.lib, libpngd.lib, libtiffd.lib, zlibd.lib (all in staticlib folder)
  4. is OK
  5. (!!!) under project properties -> configuration properties -> c/c++ -> code generation -> runtime library -> multithreaded debug (NOT dll, this was my main missing point!!!)

You will get many build warnings, but all seems to work fine. The final .exe is much more greater than with dynamic linking. No need for CMake or environment path settings, works all fine with this points! Enjoy...

2013-06-04 11:30:10 -0500 received badge  Student (source)
2013-05-23 12:43:07 -0500 received badge  Editor (source)
2013-05-23 12:42:19 -0500 asked a question Static Linking still expects dll


First of all I am no making/linking expert, never worked on big projects. I want to use OpenCV 245 with Visual C++ 2010 Express on Windows 7 (64 bit) just for reading/writing images (*.tiff, *.jpg, ...) to/from arrays. Manipulation on this arrays will be self-made for educational purposes.

I followed the setup tutorial without setting the environmental variables (I want to write the full path manually).

  1. "...\opencv\build\include" as additional include folder (otherwise than told in the tutorial where I think there is an error with this path).
  2. "...\opencv\build\x86\vc10\lib" as additional lib folder
  3. "opencv_core245d.lib" and "opencv_highgui245d.lib" as additional dependencies
  4. code contains "#include<opencv\cv.h> #include<opencv\highgui.h> using namespace cv" and in the main function "Mat img; img = imread ("test.tiff", CV_LOAD_IMAGE_COLOR);"

The building process works, but on startup the program expects the opencv_core245d.dll.

Why is this? I also tried the vc10\staticlib folder (with libjpgd.lib, libtiffd.lib, and all others), there were so many linking errors. Whats the difference between the vc10\lib and staticlib files? And whats the difference between the opencv and opencv2 include files?

Thanks for any help!