1

A line in the README says :

manually specify the OpenCV flags in the Makefile as following:

           INCS = -I/usr/local/include/opencv
           LIBS = -L/usr/local/lib -lcxcore -lcv -lhighgui -lcvaux -lml

I'm using Windows(OpenCV version 3.3.1). Can you guess what should I use instead to make it work on Windows? Here's a link to the Makefile https://github.com/npinto/fddb-evaluation/blob/master/Makefile

  • Which version of OpenCV? 1.x? – Kinght 金 Jan 10 '18 at 06:16
  • @Silencer It's 3.3.1 – Ariba Siddiqui Jan 10 '18 at 06:27
  • You linked with `-lcxcore` for c version(1.x). I don't think it's a good practice. And If your path `/usr/local/xxx` is not suitable for windows. But I'm not familiar with `Makefile`. I think `CMake` will be a better choice. – Kinght 金 Jan 10 '18 at 07:34
  • which compiler? What are the filenames of your opencv libraries? – Micka Jan 10 '18 at 07:46
  • @Silencer Actually, I've working on the FDDB dataset. trying to run the evaluation http://vis-www.cs.umass.edu/fddb/results.html the README file in that folder says: 2. If the utility 'pkg-config' is not available for your operating system, edit the Makefile to manually specify the OpenCV flags from this: INCS = `pkg-config --cflags opencv` LIBS = `pkg-config --libs opencv` to: INCS = -I/usr/local/include/opencv LIBS = -L/usr/local/lib -lcxcore -lcv -lhighgui -lcvaux -lml my system doesn't have pkg-config so I'm trying to change flags instead. – Ariba Siddiqui Jan 10 '18 at 08:03
  • @Micka g++ compiler, I guess. I've made edits. Check them if it helps. – Ariba Siddiqui Jan 10 '18 at 08:19
  • are the files called libhighgui.lib for example? Or libopencv_highgui331.lib? – Micka Jan 10 '18 at 09:20
  • @Micka None. They are called 'opencv_world340d.lib' or 'opencv_world340.lib' :/ – Ariba Siddiqui Jan 10 '18 at 10:10
  • are you sure those .lib files are for g++ on windows (mingw?)? According to https://stackoverflow.com/questions/10860352/getting-started-with-opencv-2-4-and-mingw-on-windows-7 the libs are called for example `libopencv_core240.dll.a` and afair you link them by omitting the "lib" prefix and the extension, so for example `-lopencv_core240` here. – Micka Jan 10 '18 at 10:24
  • @Micka I've been working with OpenCV-Python. I'm not sure how c++ works. I installed it just a few weeks back using http://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_setup/py_setup_in_windows/py_setup_in_windows.html – Ariba Siddiqui Jan 10 '18 at 10:34
  • if you try to compile will you get some error message like "cannot find libhighgui.lib" – Micka Jan 10 '18 at 10:36
  • I tried compiling the same code, the same way as mentioned in that question... Throwing up this error: loadimg.cpp:1:39: fatal error: opencv2/highgui/highgui.hpp: No such file or directory #include "opencv2/highgui/highgui.hpp" ^ compilation terminated. – Ariba Siddiqui Jan 10 '18 at 10:45
  • @Micka Okay, I followed the steps of https://stackoverflow.com/questions/10860352/getting-started-with-opencv-2-4-and-mingw-on-windows-7 and compiled again.. Getting this error now: c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lopencv_core243 c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lopencv_highgui243 collect2.exe: error: ld returned 1 exit status – Ariba Siddiqui Jan 10 '18 at 11:09
  • LIBS = -L/PATH_TO_LIB -lopencv_world340.lib – Kinght 金 Jan 10 '18 at 11:58
  • @Silencer Nope,not working – Ariba Siddiqui Jan 10 '18 at 15:53
  • This is as example on Ubuntu. https://i.stack.imgur.com/flEtZ.png – Kinght 金 Jan 10 '18 at 16:08

0 Answers0