Ask Your Question

Revision history [back]

running a program in codeblock (dasad

I have set up code block and mingw in windows8 (64 bit), then using CMake, created a build folder for opencv source, then in code block done all the adjustments and settings ( the ones required for adding libraries and includes), but when running a simple program in opencv, the compiler doesn't seem to recognise any of the code syntax used in opencv the code i run is here:

#include <opencv2/highgui/highgui.hpp>
int main( int argc, char** argv )
{

IplImage* img = cvLoadImage( "c:/Users/AMIN/x.jpg" ,CV_LOAD_IMAGE_UNCHANGED );
cvNamedWindow( "Example1", CV_WINDOW_AUTOSIZE );
cvShowImage( "Example1", img );
cvWaitKey(0);
cvReleaseImage( &img );
cvDestroyWindow( "Example1" );

}

I have exactly the same problem when running the program in visual studio it appears that there is a problem with the include and lib files created,

here's one of the errors i get (in codeblock) CV_LOAD_IMAGE_UNCHANGED was not declared in this scope|

i'd appreciate any help in advance

running a program in codeblock (dasad

I have set up code block and mingw in windows8 (64 bit), then using CMake, created a build folder for opencv source, then in code block done all the adjustments and settings ( the ones required for adding libraries and includes), but when running a simple program in opencv, the compiler doesn't seem to recognise any of the code syntax used in opencv the code i run is here:

#include <opencv2/highgui/highgui.hpp>
int main( int argc, char** argv )
{

IplImage* img = cvLoadImage( "c:/Users/AMIN/x.jpg" "~/x.jpg" ,CV_LOAD_IMAGE_UNCHANGED );
cvNamedWindow( "Example1", CV_WINDOW_AUTOSIZE );
cvShowImage( "Example1", img );
cvWaitKey(0);
cvReleaseImage( &img );
cvDestroyWindow( "Example1" );

}

I have exactly the same problem when running the program in visual studio it appears that there is a problem with the include and lib files created,

here's one of the errors i get (in codeblock) CV_LOAD_IMAGE_UNCHANGED was not declared in this scope|

i'd appreciate any help in advance