cant compile with opencv lib?

OpenCV is using by image processing fields.

I want to use oepncv function on .cu files!

but i cant it!!!

i try to change


#include <stlib.h>


/** include OpenCV files **/

#include <cv.h>

#include <highgui.h>

int main (int argc, char **argv){



i only write "#include"lines.

and change Makefile



#Rules and targets

include ../../common/

# for OpenCV's includes and libs, create path

NVCCFLAGS+=`pkg-config opencv --cflags`

LIB+=`pkg-config opencv --libs`

then make

where are my wrong point???

what shall i do???

plz give me any informaitoin???

OS:CentOS 5.2 64bit

CUDA driver: NVIDIA Driver for Redhat Enterprise Linux 5.x with CUDA Support (174.55)

cuda toolkit:CUDA Toolkit version 1.1 for Redhat Enterprise Linux 5.x

CUDA SDK: CUDA SDK version 1.1 for Linux

All I can suggest is upgrade to 2.0b2 and try adding --host-compilation=C++ to your nvcc command.

thank you, tmurray. however, error message do not changed… :argh:

although i upgraded to 2.0bs and added to Makefile

NVCCFLAGS += --host-compilation=c++

Are there any #defines you can do to turn off inline MMX? That should probably work for the moment, although performance may drop–I’m not sure if that’s a bug or not.

thank you again, tmurray!

i found follow line in cxtypes.h(cv.h - cxcore.h - cxtypes.h - emmintrin.h - xmmintrin.h - mmintrin.h)

 #if defined WIN64 && defined EM64T && (defined _MSC_VER || defined CV_ICC) \

      || defined __SSE2__ || defined _MM_SHUFFLE2

    #include <emmintrin.h>

    #define CV_SSE2 1


    #define CV_SSE2 0


so i write #undef SSE2 before these codes then, i can compiled it.

i tried to compile this case in windows vista 32bit,and succesfully compilation.