I\'ve worked with opencv on linux in the past, but not with cuda. I\'ve struggled with the following compilation error for months. And after trying many solutions i gave up
This looks like a linker problem. I don't know, if nvcc
follows the same conventions as gcc
, but I would try:
nvcc `pkg-config --cflags opencv` -L. -L/usr/local/cuda/lib -I. -I/usr/local/cuda/include -o threshold threshold.cpp `pkg-config --libs opencv` -lcuda -lcudart
More in general: If you write
gcc t.cpp -lB -lA
it means that libB
depends on symbols from libA
; t.cpp
can depend on symbols from libA
and libB
.