From bc7209ab31d5ae5f72dd393634881541767fa322 Mon Sep 17 00:00:00 2001 From: Tiago Koji Castro Shibata Date: Fri, 28 Dec 2018 23:13:14 -0200 Subject: [PATCH 1/2] Fix compilation with latest OpenCV C APIs were removed and must be replaced with C++ calls --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 590db18c..032c31a2 100644 --- a/Makefile +++ b/Makefile @@ -86,8 +86,8 @@ endif ifeq ($(OPENCV), 1) COMMON+= -DOPENCV CFLAGS+= -DOPENCV -LDFLAGS+= `pkg-config --libs opencv` -COMMON+= `pkg-config --cflags opencv` +LDFLAGS+= `pkg-config --libs opencv4 2> /dev/null || pkg-config --libs opencv` +COMMON+= `pkg-config --cflags opencv4 2> /dev/null || pkg-config --cflags opencv` endif ifeq ($(OPENMP), 1) From 187918f56459caef582a622df88a32af8e065ac3 Mon Sep 17 00:00:00 2001 From: Tiago Koji Castro Shibata Date: Tue, 12 Mar 2019 18:54:28 -0300 Subject: [PATCH 2/2] Enable C++11 for OpenCV 4 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 032c31a2..9159a006 100644 --- a/Makefile +++ b/Makefile @@ -59,7 +59,7 @@ else CC=gcc endif -CPP=g++ +CPP=g++ -std=c++11 NVCC=nvcc OPTS=-Ofast LDFLAGS= -lm -pthread