opencv + mingw - Can't compile

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

opencv + mingw - Can't compile

I'm trying to use OpenCV in Windows XP with Mingw compiler
(gcc version 3.4.2 (mingw-special)).
I'm having some problems compiling programs with opencv library.
I'm trying to compile an OpenCV sample:

>>> g++ image.cpp -o img -L ../OpenCV/lib -I ../OpenCV/cv/include -I
../OpenCV/otherlibs/highgui -I ../OpenCV/cxcore/include
-I ../OpenCV/cvaux/include -lcv -lhighgui -lcxcore

and I get the following error:

image.cpp: undefined reference to 'cvImage::show(char const*)'
image.cpp: undefined reference to 'cvImage::load(char const*, char
const*, int)'
collect2: ld returned 1 exit status

I think the compiler has some kind of problem with the cxcore.hpp file.
I really need to fix this problem because I really need to use
"cvImage" class. I only have problem compiling when the program uses
"cvImage" class.

Any help or suggestion will be useful.