kylemcdonald / FaceTracker

Real time deformable face tracking in C++ with OpenCV 3.
MIT License
1k stars 360 forks source link

Compilation error on OS X 10.8.4 #8

Closed timur-almaev closed 11 years ago

timur-almaev commented 11 years ago

Attempt to compile the code on 10.8.4 gave me the following error: "ISO C++ does not support ‘long long’". Possibly my bad, fixed by adding "-Wno-long-long" to the list of CFLAGS.

kylemcdonald commented 11 years ago

was this an error or a warning?

(we use long long in some of the timing code, but i don't think "long long" is a standard.)

timur-almaev commented 11 years ago

Error. As far as I know long long is only supported by C++11, which might be an issue for some systems. Below is the complete trace:

g++ -MM -MT src/lib/IO.o -MF src/lib/IO.d -Wextra -Wall -pedantic-errors -arch x86_64 -O3 -I/Users/timur/Developer/Libraries/include -Iinclude/ src/lib/IO.cc g++ -Wextra -Wall -pedantic-errors -arch x86_64 -O3 -I/Users/timur/Developer/Libraries/include -Iinclude/ -c -o src/lib/IO.o src/lib/IO.cc In file included from /Users/timur/Developer/Libraries/include/opencv2/flann/dynamic_bitset.h:49, from /Users/timur/Developer/Libraries/include/opencv2/flann/kdtree_index.h:41, from /Users/timur/Developer/Libraries/include/opencv2/flann/all_indices.h:36, from /Users/timur/Developer/Libraries/include/opencv2/flann/flann_base.hpp:44, from /Users/timur/Developer/Libraries/include/opencv2/flann/flann.hpp:50, from /Users/timur/Developer/Libraries/include/opencv/cv.h:69, from include/FaceTracker/IO.h:42, from src/lib/IO.cc:40: /Users/timur/Developer/Libraries/include/opencv2/flann/dist.h: In member function ‘int cvflann::Hamming::operator()(Iterator1, Iterator2, size_t, int) const’: /Users/timur/Developer/Libraries/include/opencv2/flann/dist.h:478: error: ISO C++ does not support ‘long long’ make: *\ [src/lib/IO.o] Error 1

kylemcdonald commented 11 years ago

oh, sorry -- i thought this was an issue on another repo when i responded initially.

it looks like opencv is using long long in dist.h, maybe that wasn't there in a previous version of opencv. i added it to the CFLAGS as you suggested. thanks!