From ed401cc29bede009c9a3227fdc6171604a177c83 Mon Sep 17 00:00:00 2001 From: jiakai Date: Fri, 19 Aug 2016 18:55:41 +0800 Subject: [PATCH] link library with -lrt; otherwise there is undefined reference to shm_open --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 36bd170..0b675bd 100644 --- a/Makefile +++ b/Makefile @@ -44,7 +44,7 @@ NVCC_GENCODE ?= -gencode=arch=compute_35,code=sm_35 \ CXXFLAGS := -I$(CUDA_INC) -fPIC -fvisibility=hidden NVCUFLAGS := -ccbin $(CXX) $(NVCC_GENCODE) -lineinfo -std=c++11 -maxrregcount 96 # Use addprefix so that we can specify more than one path -LDFLAGS := $(addprefix -L,${CUDA_LIB}) -lcudart +LDFLAGS := $(addprefix -L,${CUDA_LIB}) -lcudart -lrt ifeq ($(DEBUG), 0) NVCUFLAGS += -O3