hi everybody,
i’m trying to do a simple thing, runing some OpenCV code on my CUDA (using cublas) project.
i’m just trying to compile the folowing lines (they are in the midle of CUBLAS code):
IplImage* img;
img=cvLoadImage( "./org.jpg",CV_LOAD_IMAGE_COLOR );
cvNamedWindow("Capture",CV_WINDOW_AUTOSIZE);
cvShowImage("Capture",img);
i have all the necessary includes in the file and my makefile looks like:
# Add source files here
EXECUTABLE := gpgpu
# Cuda source files (compiled with cudacc)
CUFILES := #gpgpu.cu
# C/C++ source files (compiled with gcc / c++)
CCFILES := \
main.cpp \
auxfunctions.cpp \
#gpgpu_gold.cpp \
# Additional libraries needed by the project
USECUBLAS := 1
############################################################
####################
# Rules and targets
# for OpenCV's includes and libs, create path
NVCCFLAGS+=`pkg-config opencv --cflags`
LIB+=`pkg-config opencv --libs`
include ../../common/common.mk
when i try to compile it gives the following error:
obj/release/main.cpp.o: In function `main':
main.cpp:(.text+0xa9): undefined reference to `cvLoadImage'
main.cpp:(.text+0xbf): undefined reference to `cvNamedWindow'
main.cpp:(.text+0xcf): undefined reference to `cvShowImage'
collect2: ld returned 1 exit status
make: *** [../../bin/linux/release/gpgpu] Error 1
i supose this is because the Opencv library’s are not linked correctly. i’v looked everywhere and i was’s able to find any decent topic about putting opencv and CUDA/CUBLAS working together.
I’d really apreciate any help. I’m running Ubuntu 8.04 on a 8800 GT.
thanks