gnebehay / OpenTLD

A C++ implementation of OpenTLD
http://gnebehay.github.com/OpenTLD/
GNU General Public License v3.0
460 stars 196 forks source link

Make error on mac? #64

Open atv2016 opened 8 years ago

atv2016 commented 8 years ago

Using opencv3:

[ 2%] Building CXX object src/3rdparty/cvblobs/CMakeFiles/cvblobs.dir/blob.cpp.o In file included from /Users/alefveld/Downloads/OpenTLD-master-2/src/3rdparty/cvblobs/blob.cpp:17: /Users/alefveld/Downloads/OpenTLD-master-2/src/3rdparty/cvblobs/blob.h:21:10: fatal error: 'opencv/cxcore.h' file not found

include <opencv/cxcore.h>

     ^

1 error generated. make[2]: * [src/3rdparty/cvblobs/CMakeFiles/cvblobs.dir/blob.cpp.o] Error 1 make[1]: * [src/3rdparty/cvblobs/CMakeFiles/cvblobs.dir/all] Error 2 make: *\ [all] Error 2

noboomu commented 8 years ago

I got it to compile on 10.11 by setting CMAKE_CXX_FLAGS to -std=c++11 -Wno-c++11-narrowing in ccmake config screen

replacing line (29?) in the CMakeLists.txt file in the root directory find_package(OpenCV REQUIRED with

find_package(OpenCV REQUIRED PATHS /usr/local/Cellar/opencv3/HEAD NO_DEFAULT_PATH)
if (OpenCV_FOUND)
   include_directories(${OpenCV_INCLUDE_DIRS})
endif()

(assuming opencv was installed with homebrew)

atv2016 commented 7 years ago

thanks i'll try that!

hakangs commented 7 years ago

Tried that but :

[ 44%] Building CXX object src/libopentld/CMakeFiles/libopentld.dir/tld/Clustering.cpp.o
/Users/hakanmoray/Downloads/OpenTLD-master/src/libopentld/tld/Clustering.cpp:54:31: error: no template named 'vector'; did you mean 'std::vector'?
void Clustering::calcMeanRect(vector<int> * indices)
                              ^~~~~~
                              std::vector