ฉันเป็นมือใหม่กับ Ubuntu และใช้ Ubuntu 14.04 64- บิต ฉันต้องการmake
โครงการที่ใช้cuda
และopencv
ฉันได้รับข้อผิดพลาดต่อไปนี้เมื่อทำงานcmake . && make
Linking CXX executable ground_estimation
/usr/bin/ld: cannot find -lcudart
collect2: error: ld returned 1 exit status
make[2]: *** [ground_estimation] Error 1
make[1]: *** [CMakeFiles/ground_estimation.dir/all] Error 2
make: *** [all] Error 2
นี่คือผลลัพธ์ของ ld -lcudart --verbose
attempt to open /usr/x86_64-linux-gnu/lib64/libcudart.so failed
attempt to open /usr/x86_64-linux-gnu/lib64/libcudart.a failed
attempt to open //usr/local/lib/x86_64-linux-gnu/libcudart.so failed
attempt to open //usr/local/lib/x86_64-linux-gnu/libcudart.a failed
attempt to open //usr/local/lib64/libcudart.so failed
attempt to open //usr/local/lib64/libcudart.a failed
attempt to open //lib/x86_64-linux-gnu/libcudart.so failed
attempt to open //lib/x86_64-linux-gnu/libcudart.a failed
attempt to open //lib64/libcudart.so failed
attempt to open //lib64/libcudart.a failed
attempt to open //usr/lib/x86_64-linux-gnu/libcudart.so failed
attempt to open //usr/lib/x86_64-linux-gnu/libcudart.a failed
attempt to open //usr/lib64/libcudart.so failed
attempt to open //usr/lib64/libcudart.a failed
attempt to open //usr/local/lib/libcudart.so failed
attempt to open //usr/local/lib/libcudart.a failed
attempt to open //lib/libcudart.so failed
attempt to open //lib/libcudart.a failed
attempt to open //usr/lib/libcudart.so failed
attempt to open //usr/lib/libcudart.a failed
libcudart
มีอยู่ใน/usr/local/cuda/lib64
และฉันยังเพิ่มไปยังเส้นทางห้องสมุด:
echo $LD_LIBRARY_PATH
/usr/lib/nvidia-current:/usr/local/cuda/lib64:/usr/local/cuda/lib:
นี่คือผลลัพธ์ของls /usr/local/cuda/lib64
:
libcublas_device.a libcufftw.so.6.0.37 libnppi.so.6.0
libcublas.so libcuinj64.so libnppi.so.6.0.37
libcublas.so.6.0 libcuinj64.so.6.0 libnpps.so
libcublas.so.6.0.37 libcuinj64.so.6.0.37 libnpps.so.6.0
libcudadevrt.a libcurand.so libnpps.so.6.0.37
libcudart.so libcurand.so.6.0 libnvblas.so
libcudart.so.6.0 libcurand.so.6.0.37 libnvblas.so.6.0
libcudart.so.6.0.37 libcusparse.so libnvblas.so.6.0.37
libcudart_static.a libcusparse.so.6.0 libnvToolsExt.so
libcufft.so libcusparse.so.6.0.37 libnvToolsExt.so.1
libcufft.so.6.0 libnppc.so libnvToolsExt.so.1.0.0
libcufft.so.6.0.37 libnppc.so.6.0 libOpenCL.so
libcufftw.so libnppc.so.6.0.37 libOpenCL.so.1
libcufftw.so.6.0 libnppi.so
สิ่งที่ฉันควรจะทำอย่างไรที่ld
การค้นหาใน/usr/local/cuda/lib64
เส้นทางที่จะหาlibcudart
?
ls /usr/local/cuda/lib64
?