dlink.o: In function `__cudaRegisterLinkedBinary_38_cuda_device_runtime_compute_70_cpp1_ii_8b1a5d37':
link.stub:(.text+0x280): undefined reference to `__fatbinwrap_38_cuda_device_runtime_compute_70_cpp1_ii_8b1a5d37'
.
I think that it means that I didn’t link against cudadevrt, but I did?!
Do you see the problem?
I don’t see CUDALIBS or LIBS defined anywhere in what you have shown. But my guess is you have not provided the proper libraries at the final link phase (which you are doing with CC).
Anyway, there’s not enough information here to sort this out. THe full makefile, plus the actual commands issued, at a minimum, would be needed to make a definitive statement.
UPDATE: this problem was solved by changing the cuda version from 11.1 to 10.2.
I met the same problem in a new machine. My make file works fine in Ubuntu 16.04 and 18.04 both. But in a new machine recently installed with ubuntu 18.04, I got the same unreferenced function error. Could you help me out?
Thanks
Ze
Below is my Makefile:
CC=g++
CFLAGS=-O3 -fopenmp -DVM61 #-VM70 and VM75 will have 96Kb and 64Kb shared memory
#CFLAGS= -g -Wall -pedantic # debugging C-Compiler flags
INCDIRS=-I/usr/local/cuda/include
LD=g++ # used linker
LFLAGS=-O3 -lstdc++ -std=c++11 -fopenmp -lpthread # linker flags
LIBS=-lm -lz -L/usr/local/cuda/lib64 # used libraries