Dear all,
My gcc and g++ version are both 4.8.5. My system is ubuntu18.04.
The two following steps have passed:
nvcc -D_DEBUG --use_fast_math -I"/usr/local/cuda-9.0//include" -I"/usr/include/eigen3" -I"/home/xingfu/NVIDIA_CUDA-9.0_Samples/common/inc" -dlink --machine 64 -arch=sm_50 -c -o kernel_cuda.o …/CudaTest/kernel.cu
g++ -c -pipe -g -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_CORE_LIB -I…/CudaTest -I. -I/usr/local/cuda-9.0/include -isystem /usr/include/eigen3 -I…/NVIDIA_CUDA-9.0_Samples/common/inc -isystem /usr/local/include -I…/Qt5.11.0/5.11.0/gcc_64/include -I…/Qt5.11.0/5.11.0/gcc_64/include/QtCore -I. -I…/Qt5.11.0/5.11.0/gcc_64/mkspecs/linux-g++ -o LBDM.o …/CudaTest/LBDM.cpp
However, when run the following step, the error occured:
g++ -Wl,-rpath,/home/xingfu/Qt5.11.0/5.11.0/gcc_64/lib -o CudaTest kernel_cuda.o LBDM.o -L/usr/local/cuda-9.0//lib64/ -lcuda -lcudart -lcublas -L/home/xingfu/CudaTest/…/…/…/usr/local/lib/ -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_imgcodecs -L/home/xingfu/Qt5.11.0/5.11.0/gcc_64/lib -lQt5Core -lpthread
The compiler error shows:
kernel_cuda.o: In function __sti____cudaRegisterAll()‘:
tmpxft_00000e7d_00000000-5_kernel.cudafe1.cpp:(.text+0x177e): undefined reference to__cudaRegisterLinkedBinary_41_tmpxft_00000e7d_00000000_6_kernel_cpp1_ii_channel’
How can I fix the error?
Long