1

How to setup opencv2.4.0 with mingw in Netbeans? I want to make the setup in windows xp x86 machine?

Updated: I made a setup as set in this link SO link. My program get compiled properly but while executing, it got crahed.

I also Posted the same in this link-MyPost

User PATH Variables: C:\ctags;C:\cscope;C:\MinGW\bin;C:\OpenCV2.4.0\build\x86\mingw\bin;

System PATH variable: ./bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\system32\wbem;C:\Program Files\Intel\WiFi\bin;C:\Program Files\TortoiseSVN\bin;C:\WINDOWS\system32\gs\gs7.05\bin;C:\cscope;C:\ctags;C:\Program Files\Vim\vim73;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Java\jre6\bin;C:\Program Files\Windows Imaging\;C:\MinGW\msys\1.0\bin;C:\OpenCV2.4.0\build\x86\mingw\bin;C:\MinGW\bin;

Update:

I tried compiling and adding TBB path in windows 7. Even after adding the PATH I get the same issue and the snap shot of the error is below:

Error Image in Windows 7

I tried the same in windows XP and I didnt get the above error but the application get crashed as before.

Community
  • 1
  • 1
2vision2
  • 4,933
  • 16
  • 83
  • 164
  • Have you already made MingW work with Netbeans? If so, what have you tried to answer your own question? – Tae-Sung Shin Oct 22 '12 at 23:38
  • You can try my answer [How to build and use openCV with Netbeans 7.2 . Step by step](http://stackoverflow.com/a/12505581/1322642) – moskito-x Oct 23 '12 at 02:34
  • @Thomas Yes I already installed Mingw. I tried the same setup and steps with opencv2.1 and its working fine. – 2vision2 Oct 23 '12 at 03:48
  • Please say what "not working fine" means. You should give me specifics to help you. – Tae-Sung Shin Oct 23 '12 at 03:56
  • @Thomas Thanks a lot for your response. I have updated my question. Please have a look and your suggestion on it would be grateful. – 2vision2 Oct 23 '12 at 04:16
  • Check your system path. Better, post your system path too. I am almost sure it's system path issue. – Tae-Sung Shin Oct 23 '12 at 04:29
  • ;C:\MinGW\msys\1.0\bin;C:\OpenCV2.4.0\build\x86\mingw\bin;C:\MinGW\bin; I have added above in my system path. Is it right or do I wanna add something else? – 2vision2 Oct 23 '12 at 05:20
  • @Thomas I have updated my question. And the previous comment also contains the same. I replied to u long back but missed "@Thomas". – 2vision2 Oct 23 '12 at 06:40
  • @user1317084 With precompiled libs of "opencv" in directory "OpenCV2.4.0\build\x86\mingw\bin", there are always problems. Also I have tried to use this. To compile my programs always worked. When run, the program crashed. This is a common error among programmers who use these libs. try "opencv" to [compile](http://stackoverflow.com/a/12505581/1322642) it yourself. – moskito-x Oct 24 '12 at 14:25

1 Answers1

1

Did you do this?

Since version 2.1, OpenCV use the TBB library to support parallel processing.

If you use MinGW as a compile suite you should compile TBB yourself

http://opencv.willowgarage.com/wiki/TBB

http://opencv.willowgarage.com/wiki/MinGW

After compilation, you need to add its path to system path.

FYI, OpenCV 2.4.2 provided with compiled TBB dll for MingW.

Tae-Sung Shin
  • 20,215
  • 33
  • 138
  • 240
  • Thanks for your reply Thomas.No I dont know this!!! I didnt compile TBB and add path also. I blindly followed the steps in this path http://stackoverflow.com/questions/10860352/getting-started-with-opencv-2-4-and-mingw-on-windows-7/10860353#comment17523493_10860353. But I never compiled TBB. One more doubt here is I didnt compile TBB for opencv2.1? is it right? Am struggling to compile a sample code for past two days and failed. – 2vision2 Oct 23 '12 at 10:45
  • AFAIK TBB is to increase the performance of opencv? correct me if am wrong.. And also if possible could you please elaborate a bit more on this? And what I understand from your answer is to compile a sample program using opencv2.4.0 using mingw compiler suite I need to download and compile TBB? And which path do I need to add? – 2vision2 Oct 23 '12 at 10:58
  • Actually, in many case, OpenCV will crash if you don't add TBB. Please follow the links I provided. You will compile TBB into dll and you need to add directory that contains the dll to system path. – Tae-Sung Shin Oct 23 '12 at 11:17
  • Thanks a lot! I ll try with what u said. And in the previous post I got a response for the same issue. Please have a look and this is the link http://stackoverflow.com/questions/13005304/opencv2-4-0-with-mingw-in-windows-get-crashed – 2vision2 Oct 23 '12 at 12:14
  • Hi, am really sorry to trouble you. I tried whatever you said in windows 7. But I get the same error as before. And the snap shot of the error is attached - in my question. Please have a look. Thanks in advance. – 2vision2 Oct 24 '12 at 05:36
  • That means your MingW\bin is not added to system path correctly. try copy the dll from `C:\MinGW\bin` to `C:\OpenCV2.4.0\build\x86\mingw\bin` – Tae-Sung Shin Oct 24 '12 at 09:34
  • Ya tried as you said, still am getting the same error. But in windows xp I didnt find this error. The application just crashes. – 2vision2 Oct 24 '12 at 09:41
  • try to reinstall your mingw. i am at the bottom of advice. – Tae-Sung Shin Oct 24 '12 at 09:45