Ask Your Question
0

OpenCV on Windows 10 with NetBeans IDE 8.1 not working

asked 2016-03-25 06:50:10 -0600

c47Lo gravatar image

I have installed the latest version of OpenCV. Now I'm trying to configure NetBeans to use it. I put ../../../../../opencv/build/include in the C++ compiler and in the Linker ../../../../../opencv/build/x64/vc14/lib with the libraries opencv_world310 and opencv_world310d. I'm using Cygwin. When I build a simple project I receive the message BUILD FAILED (exit value 2, total time: 1s).

Thank you very much!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-03-25 06:58:53 -0600

berak gravatar image

you cannot use the prebuild visual studio libs with mingw.

if you insist on using a cygwin environment, you will have to build the opencv libs locally, using cmake (and please use mingw64, not mingw32)

pretty similar to here , you can skip all the dependancies on win.

edit flag offensive delete link more

Comments

Probably I'm missing something. I'm using Cygwin64 and no online guide say to build the opencv libs locally. Can you be more precise and explane what command i have to do? I try to build it like on ubuntu but I receive the message "..does not appear to contain CMakeLists". I have to make a new folder build? Where? I don't understand.. Thank you very much for the help! After two days of trying I see the possibility to make it work!

c47Lo gravatar imagec47Lo ( 2016-03-25 09:55:20 -0600 )edit

" I have to make a new folder build?" - yes. and you have to cd into it, and run cmake from there

"Where? " -- it does not matter.

last: cmake (some args) <path-to-opencv-src-dir>

berak gravatar imageberak ( 2016-03-25 10:12:30 -0600 )edit

Perfect! I receive -- Configuring done -- Generating done -- Build files have been written to: /build Now I think I have to change the path in NetBeans to this folder. It is correct?

c47Lo gravatar imagec47Lo ( 2016-03-25 10:41:32 -0600 )edit

sorry i never use netbeans, so idk.

but maybe, it's a good idea, to generate plain unix makefiles to build the libs (see cmake -G) , and later use cmake again to generate netbeans project for your own project

berak gravatar imageberak ( 2016-03-25 10:47:09 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-03-25 06:50:10 -0600

Seen: 734 times

Last updated: Mar 25 '16