netbeans 7.2.1 integration

asked 2013-09-11 06:18:01 -0600

jainam2209 gravatar image

Dear OpenCV experts,

I am new to OpenCV and am trying to configure OpenCV v2.4.6 with Netbeans v7.2.1 with Cygwin. I have configured Cygwin for netbeans and can succefully compile and run C and C++ programs. There is a tutorial guiding opencv v2.0 and netbeans v6.8 integration which I followed but got stuck at one point.

First of all, in all the tutorials may it be with cygwin, mingw or cmake, all says, "setup OpenCV!!". The file that I downloaded from sourceforge (http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.4.6/OpenCV-2.4.6.0.exe/download) gets extracted and not installed! Second thing, all the tutorials mention about a library folder (lib) in the main OpenCV directory, which is NOT there. I checked with OpenCV 2.4.3 also, there is no such folder. There are lib folders in build->x64 and x86 -> migwin, vc9, vc10 and vc11 but not in the main directory.

These are the steps I followed, I extracted the contents of OpenCV 2.4.6 to "D:\opencv". Then I created a new project (C/C++ application) in Netbeans and in Properties, Category -> Build -> C++ Compiler -> Include Directories I added: D:\opencv\include\opencv

Now in the tutorials which I referred, said to next go to Category -> Linker, and add: D:\opencv\lib in the "Additional Library Directories". But there is no "lib" folder in the opencv directory! So here I get stuck. I tried different libraries from other folders but doesn't work.

I have included D:\cygwin\bin to my "Path" in Environment Variable (Windows System Properties -> Advance -> Environment Variable). Is any folder from OpenCV to be added here?

If anyone of you have integrated opencv with netbeans and can help me out, it would be great!

Thank you in advance!

BR!

Jainam

edit retag flag offensive close merge delete

Comments

"I have included D:\cygwin\bin to my "Path" in Environment Variable"

you'll have to add the folder with the opencv dlls, too.

choose the lib folder form x86\mingw or x64\mingw

berak gravatar imageberak ( 2013-09-11 10:37:57 -0600 )edit

Thanks for the reply. I added the folder (D:\opencv\build\x86\mingw\lib) as you mentioned, but it doesn't work. As I am using cygwin and not mingw, won't using mingw library be unnecessary? One more thing, when I write any code which uses codes like "cvNamedWindow", "cvShowImage", etc. from the tutorial I have, there are little red warning symbols in front of all the codes. I guess, this is because netbeans doesn't recognize these commands. Correct me if I am wrong.

jainam2209 gravatar imagejainam2209 ( 2013-09-11 11:01:29 -0600 )edit

as i don't know enough about netbeans, it's comments only, not a proper reply

you need to link against some libs, and the vs ones are definitely the wrong ones. (mingw/cygwin are both gcc family, so that should work.)

if netbeans gives you red things, you're right, it did not find their definitions. but that's related to headers/includes, not libraries. so check the respective include paths again opencv\build\include is the hint here

berak gravatar imageberak ( 2013-09-11 11:13:06 -0600 )edit