> dsexample_lib
>dsexample_lib.c
>dsexample_lib.h
>Makefile
>cudaCrop.cu (new add)
>cudaCrop.h (new add)
>cudaUtility.h (new add)
>cudaMath.h (new add)
here is my document tree. i wanna call cuda_function.
in dsexample_lib.h file, the cudaCrop.h is included
#include "cudaCrop.h"
/* other code*/
is there any suggestion?
NVCC:=/usr/local/cuda-10.0/bin/nvcc
run: dsexample_lib.o cudaCrop.o
gcc -L /usr/local/cuda-10.0/lib64 -c -o dsexample_lib_cuda.o -fPIC dsexample_lib.o cudaCrop.o -lcudart -lcuda
dsexample_lib.o: dsexample_lib.c cudaCrop.h
gcc -I /usr/local/cuda-10.0/include -I . -c -o dsexample_lib.o dsexample_lib.c
cudaCrop.o: cudaCrop.cu cudaCrop.h
$(NVCC) -c -o cudaCrop.o cudaCrop.cu
all:
ar rcs libdsexample.a dsexample_lib_cuda.o
here is my makefile. i am using deepstream4.0 jetson nano
but it throws out this error!
gcc -L /usr/local/cuda-10.0/lib64 -c -o dsexample_lib_cuda.o -fPIC dsexample_lib.o cudaCrop.o -lcudart -lcuda
gcc: warning: dsexample_lib.o: linker input file unused because linking not done
gcc: warning: cudaCrop.o: linker input file unused because linking not done