Reputation: 2065
I am trying to install Opencv in linux platform. Basically, I am following http://sysads.co.uk/2014/05/install-opencv-2-4-9-ubuntu-14-04-13-10/.
But whenever I am trying to build samples I am getting the following error-
compiling contours.c
/usr/bin/ld: cannot find -lcufft
/usr/bin/ld: cannot find -lnpps
/usr/bin/ld: cannot find -lnppi
/usr/bin/ld: cannot find -lnppc
However, I have all these files in /usr/local/cuda-7.5/.
I have CUDA installed properly. the output of lspci -v -s $(lspci | grep VGA | cut -d" " -f 1)
01:00.0 VGA compatible controller: NVIDIA Corporation GK107GL [Quadro K600] (rev a1) (prog-if 00 [VGA controller])
Subsystem: Hewlett-Packard Company Device 094b
Physical Slot: 2
Flags: bus master, fast devsel, latency 0, IRQ 30
Memory at ee000000 (32-bit, non-prefetchable) [size=16M]
Memory at d0000000 (64-bit, prefetchable) [size=256M]
Memory at e0000000 (64-bit, prefetchable) [size=32M]
I/O ports at e000 [size=128]
[virtual] Expansion ROM at ef000000 [disabled] [size=512K]
Capabilities: <access denied>
Kernel driver in use: nvidia
Please help.
Upvotes: 1
Views: 203
Reputation: 2065
I have solved this by editing build_all.sh
which can be found in /usr/local/share/OpenCV/samples/c
directory.
New build_all.sh is:
#!/bin/sh
if [ $# -gt 0 ] ; then
base=`basename $1 .c`
echo "compiling $base"
gcc -ggdb -L /usr/local/cuda-7.5/lib64 `pkg-config opencv --cflags --libs` $base.c -o $base
else
for i in *.c; do
echo "compiling $i"
gcc -ggdb -L /usr/local/cuda-7.5/lib64 `pkg-config --cflags opencv` -o `basename $i .c` $i `pkg-config --libs opencv`;
done
for i in *.cpp; do
echo "compiling $i"
g++ -ggdb -L /usr/local/cuda-7.5/lib64 `pkg-config --cflags opencv` -o `basename $i .cpp` $i `pkg-config --libs opencv`;
done
fi
Upvotes: 2