when i test my opencv package in c file by using the command
$ gcc cvtest.c -o cvtest `pkg-config opencv --cflags --libs`
There are with some error
/usr/bin/ld: cannot find -lcufft
/usr/bin/ld: cannot find -lnpps
/usr/bin/ld: cannot find -lnppi
/usr/bin/ld: cannot find -lnppc
/usr/bin/ld: cannot find -lcudart
According to this post in stackoverflow
http://stackoverflow.com/questions/24322466/makefile-opencv-stopped-working
i change the command with -L to my cuda lib path
$gcc -L /usr/local/cuda/lib64 cvtest.c -o cvtest `pkg-config opencv --cflags --libs`
it's working
or put the cuda lib path in LIBRARY_PATH
export LIBRARY_PATH=/usr/local/cuda/lib64
沒有留言:
張貼留言