CUDA with other C++ libraries (specifically OpenCV)

Hello, I’m a CUDA noob, and would like to execute some parts of an image processing application on GPU. I’ve gotten used to coding in CUDA, but haven’t found a way to compile an application with an external c++ library. I have to specify extra include/library directories and flags (made easy by pkg-config) in order to compile an OpenCV application with g++. I see how to include c++ code in the sample makefiles, but I can’t seem to get the extra paths into the make script. I’m not very good with makefiles, and haven’t taken the time to try and understand Common.mk, but I’m hoping there might be an easier answer.

Any suggestions?

bump :(

use make with this additional options:

make INCLUDES=-I…/include/directorie LIB=-L…/lib/directorie

I hope that work. If not add in the common.mk file the include directorie at line 78 (I use the SDK 2.3 might be different by another version):

INCLUDES += -I. -I$(CUDA_INSTALL_PATH)/include -I$(COMMONDIR)/inc -I…/include/directorie

and at line 191 after this block the lib directorie:

ifeq “$(strip $(HP_64))” “”

LIB := -L$(CUDA_INSTALL_PATH)/lib -L$(LIBDIR) -L$(COMMONDIR)/lib/$(OSLOWER)

else

LIB := -L$(CUDA_INSTALL_PATH)/lib64 -L$(LIBDIR) -L$(COMMONDIR)/lib/$(OSLOWER)

endif

LIB += -L…/lib/directorie

Lucas