Ask Your Question

scream2ice's profile - activity

2013-07-11 23:23:34 -0600 commented question running a program in codeblock (dasad

i've just used '~'here in the code, the path was quite long, so i just put this sign here instead, im actually beginning to think that maybe the latest version opencv249 which is released by source <link/> has some problems with the libraries and binaries that you make using cmake, they just don't work

2013-07-11 07:14:01 -0600 received badge  Editor (source)
2013-07-11 07:13:22 -0600 asked a question 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( "~/x.jpg" ,CV_LOAD_IMAGE_UNCHANGED );
cvNamedWindow( "Example1", CV_WINDOW_AUTOSIZE );
cvShowImage( "Example1", img );
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