windows - Command prompt in debug mode for Eclipse? (OpenCV + Eclipse + Win7) -


i beginner eclipse. have eclipse c/c++ ide opencv library running on windows 7. far works after spending hours trying running. realize eclipse not pop command prompt vs2010 while debugging. , eclipse's debug mode stuck in there , refuse output anything. if code doesn't involve opencv things works again.

below code use testing. captures images webcam , output screen. infinite loop (until press 'q') makes sure grabs new inputs camera.

i browsed through workspace , run exe compiled , worked flawlessly. don't think there's wrong in code (it's example code anyway

in brief, can pop command prompt window in debug mode? , why eclipse console stuck when code involves opencv functions?

#include <stdio.h> #include <stdlib.h> #include <tchar.h> #include <cv.h> #include <cxcore.h> #include <highgui.h> #include <iostream>  int _tmain(int argc, _tchar* argv[]) {     cvcapture *capture = 0;     iplimage  *frame = 0;     int       key = 0;      /* initialize camera */     capture = cvcapturefromcam( 0 );      /* check */     if ( !capture ) {         printf("cannot open initialize webcam!\n");         return 1;     }      /* create window video */     cvnamedwindow( "result", cv_window_autosize );      while( key != 'q' ) {         /* frame */         frame = cvqueryframe( capture );          /* check */         if( !frame ) break;          /* display current frame */         cvshowimage( "result", frame );          /* exit if user press 'q' */         key = cvwaitkey( 1 );     }      /* free memory */     cvdestroywindow( "result" );     cvreleasecapture( &capture );      return 0; } 

this because have set windows 7 system variable path mingw/bin , compiled opencv bin directories. when run program folder system automatically take required binaries path , program runs correctly.

i don't know why eclipse not take directly system environment path variable. have set ourself.

     go preferences > c/c++ (expand it) > environment > add:       "name:path"       "value:c:\mingw\bin;c:\opencv_mingw\bin" 

where opencv_mingw folder compiled opencv


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -