I want to use CUDA and run my computer vision code on jetson nano 2g. So following is my makefile for the code. I am getting an error while running this file. The error says: Library is compiled without CUDA support. Can you help me to make changes in the makefile.
Makefile:
INCLUDE_DIRS = -I/usr/include/opencv4
LIB_DIRS =
CC=g++
CDEFS=
CFLAGS= -O3 -g $(INCLUDE_DIRS) $(CDEFS)
LIBS= -L/usr/lib -lopencv_core -lopencv_flann -lopencv_video -lrt
HFILES=
CFILES= capture2.cpp
SRCS= ${HFILES} ${CFILES}
OBJS= ${CFILES:.cpp=.o}
all: capture2
clean:
-rm -f *.o *.d
-rm -f capture2
capture2: capture2.o
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $@.o pkg-config --libs opencv4
$(LIBS)
depend:
.cpp.o: $(SRCS)
$(CC) $(CFLAGS) -c $<