ofxCV compile error

Hi,
I’m trying to bring back some old project (actually not so old) to rework on it. But I can’t compile it properly.
There is a bunch of error comming with ofxCv. I tried with the OF 007 and old version of ofxCv and ofxOpenCV that I backed up in my git with the project, either with the new 0072 and last update of ofxCv. I moved to mountain lion and last xcode version since this project, that’s the only difference so far I can see.
it seems there is something wrong between opencv2/core/core.hpp and the complex gcc class or something…
here is my compile log. any idea what could be wrong?

  
  
CompileC /Users/pach/Library/Developer/Xcode/DerivedData/ADT_app-aqukqafmasxvmlgexlytewwkoupp/Build/Intermediates/ADT_app.build/Debug/ADT_app.build/Objects-normal/i386/ConnectedTriangles.o src/ConnectedTriangles.cpp normal i386 c++ com.apple.compilers.llvm.clang.1_0.compiler  
    cd /Users/pach/Documents/TAFF/OF/of_v0072_osx_release/apps/ADT/ADT_apps  
    setenv LANG en_US.US-ASCII  
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -arch i386 -fmessage-length=0 -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wno-unused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-shorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -fasm-blocks -Wdeprecated-declarations -Wno-invalid-offsetof -g -mssse3 -Wno-sign-conversion -I/Users/pach/Library/Developer/Xcode/DerivedData/ADT_app-aqukqafmasxvmlgexlytewwkoupp/Build/Intermediates/ADT_app.build/Debug/ADT_app.build/ADT_appDebug.hmap -I/Users/pach/Documents/TAFF/OF/of_v0072_osx_release/apps/ADT/ADT_apps/bin/include -I../../../libs/openFrameworks -I../../../libs/openFrameworks/3d -I../../../libs/openFrameworks/app -I../../../libs/openFrameworks/communication -I../../../libs/openFrameworks/events -I../../../libs/openFrameworks/gl -I../../../libs/openFrameworks/graphics -I../../../libs/openFrameworks/math -I../../../libs/openFrameworks/sound -I../../../libs/openFrameworks/types -I../../../libs/openFrameworks/utils -I../../../libs/openFrameworks/video -I../../../libs/poco/include -I../../../libs/freetype/include -I../../../libs/freetype/include/freetype2 -I../../../libs/fmodex/include -I../../../libs/glew/include -I../../../libs/FreeImage/include -I../../../libs/tess2/include -I../../../libs/cairo/include/cairo -I../../../libs/rtAudio/include -I../../../addons/ofxCv/libs/ofxCv/include -I../../../addons/ofxOpenCv/libs -I../../../addons/ofxOpenCv/libs/opencv -I../../../addons/ofxOpenCv/libs/opencv/include -I../../../addons/ofxOpenCv/libs/opencv/include/opencv -I../../../addons/ofxOpenCv/libs/opencv/include/opencv2 -I../../../addons/ofxOpenCv/libs/opencv/include/opencv2/calib3d -I../../../addons/ofxOpenCv/libs/opencv/include/opencv2/contrib -I../../../addons/ofxOpenCv/libs/opencv/include/opencv2/core -I../../../addons/ofxOpenCv/libs/opencv/include/opencv2/features2d -I../../../addons/ofxOpenCv/libs/opencv/include/opencv2/flann -I../../../addons/ofxOpenCv/libs/opencv/include/opencv2/gpu -I../../../addons/ofxOpenCv/libs/opencv/include/opencv2/highgui -I../../../addons/ofxOpenCv/libs/opencv/include/opencv2/imgproc -I../../../addons/ofxOpenCv/libs/opencv/include/opencv2/legacy -I../../../addons/ofxOpenCv/libs/opencv/include/opencv2/ml -I../../../addons/ofxOpenCv/libs/opencv/include/opencv2/objdetect -I../../../addons/ofxOpenCv/libs/opencv/include/opencv2/ts -I../../../addons/ofxOpenCv/libs/opencv/include/opencv2/video -I../../../addons/ofxOpenCv/libs/opencv/lib -I../../../addons/ofxOpenCv/libs/opencv/lib/osx -I../../../addons/ofxOpenCv/src -I/Users/pach/Library/Developer/Xcode/DerivedData/ADT_app-aqukqafmasxvmlgexlytewwkoupp/Build/Intermediates/ADT_app.build/Debug/ADT_app.build/DerivedSources/i386 -I/Users/pach/Library/Developer/Xcode/DerivedData/ADT_app-aqukqafmasxvmlgexlytewwkoupp/Build/Intermediates/ADT_app.build/Debug/ADT_app.build/DerivedSources -F/Users/pach/Documents/TAFF/OF/of_v0072_osx_release/apps/ADT/ADT_apps/bin -F/Users/pach/Documents/TAFF/OF/of_v0072_osx_release/apps/ADT/ADT_apps/../../../libs/glut/lib/osx -F/Users/pach/Documents/TAFF/OF/of_v0072_osx_release/apps/ADT/ADT_apps/ofxSyphon/libs/Syphon/lib/osx -F/Users/pach/Documents/TAFF/OF/of_v0072_osx_release/apps/ADT/ADT_apps/../../../contributed_addons/ofxSyphon/libs/Syphon/lib/osx -D__MACOSX_CORE__ -lpthread -mtune=native -include /Users/pach/Library/Developer/Xcode/DerivedData/ADT_app-aqukqafmasxvmlgexlytewwkoupp/Build/Intermediates/PrecompiledHeaders/Carbon-azocyqgyipecavdmumjtjeurycxt/Carbon.h -MMD -MT dependencies -MF /Users/pach/Library/Developer/Xcode/DerivedData/ADT_app-aqukqafmasxvmlgexlytewwkoupp/Build/Intermediates/ADT_app.build/Debug/ADT_app.build/Objects-normal/i386/ConnectedTriangles.d --serialize-diagnostics /Users/pach/Library/Developer/Xcode/DerivedData/ADT_app-aqukqafmasxvmlgexlytewwkoupp/Build/Intermediates/ADT_app.build/Debug/ADT_app.build/Objects-normal/i386/ConnectedTriangles.dia -c /Users/pach/Documents/TAFF/OF/of_v0072_osx_release/apps/ADT/ADT_apps/src/ConnectedTriangles.cpp -o /Users/pach/Library/Developer/Xcode/DerivedData/ADT_app-aqukqafmasxvmlgexlytewwkoupp/Build/Intermediates/ADT_app.build/Debug/ADT_app.build/Objects-normal/i386/ConnectedTriangles.o  
  
clang: warning: -lpthread: 'linker' input unused when '-c' is present  
In file included from /Users/pach/Documents/TAFF/OF/of_v0072_osx_release/apps/ADT/ADT_apps/src/ConnectedTriangles.cpp:10:  
In file included from /Users/pach/Documents/TAFF/OF/of_v0072_osx_release/apps/ADT/ADT_apps/src/DancerManager.h:11:  
In file included from /Users/pach/Documents/TAFF/OF/of_v0072_osx_release/apps/ADT/ADT_apps/../../../addons/ofxCv/src/ofxCv.h:20:  
In file included from ../../../addons/ofxOpenCv/libs/opencv/include/opencv2/opencv.hpp:47:  
In file included from ../../../addons/ofxOpenCv/libs/opencv/include/opencv2/core/core.hpp:58:  
/usr/include/c++/4.2.1/complex:64:30: error: variable 'sqrt' declared as a template  
  template<typename _Tp> _Tp norm(const complex<_Tp>&);  
  ~~~~~~~~~~~~~~~~~~~~~~     ^  
/Users/pach/Documents/TAFF/OF/of_v0072_osx_release/apps/ADT/ADT_apps/../../../contributed_addons/ofxBox2d/src/ofxBox2dPolygonUtils.h:41:20: note: expanded from macro 'norm'  
#define norm(v)    sqrt(norm2(v))  // norm = length of vector  
                   ^  
In file included from /Users/pach/Documents/TAFF/OF/of_v0072_osx_release/apps/ADT/ADT_apps/src/ConnectedTriangles.cpp:10:  
In file included from /Users/pach/Documents/TAFF/OF/of_v0072_osx_release/apps/ADT/ADT_apps/src/DancerManager.h:11:  
In file included from /Users/pach/Documents/TAFF/OF/of_v0072_osx_release/apps/ADT/ADT_apps/../../../addons/ofxCv/src/ofxCv.h:20:  
In file included from ../../../addons/ofxOpenCv/libs/opencv/include/opencv2/opencv.hpp:47:  
In file included from ../../../addons/ofxOpenCv/libs/opencv/include/opencv2/core/core.hpp:58:  
/usr/include/c++/4.2.1/complex:64:35: error: expected expression  
  template<typename _Tp> _Tp norm(const complex<_Tp>&);  
                                  ^  
/Users/pach/Documents/TAFF/OF/of_v0072_osx_release/apps/ADT/ADT_apps/../../../contributed_addons/ofxBox2d/src/ofxBox2dPolygonUtils.h:41:31: note: expanded from macro 'norm'  
#define norm(v)    sqrt(norm2(v))  // norm = length of vector  
                              ^  
/Users/pach/Documents/TAFF/OF/of_v0072_osx_release/apps/ADT/ADT_apps/../../../contributed_addons/ofxBox2d/src/ofxBox2dPolygonUtils.h:40:24: note: expanded from macro 'norm2'  
#define norm2(v)   dot(v,v)        // norm2 = squared length of vector  
                       ^  
In file included from /Users/pach/Documents/TAFF/OF/of_v0072_osx_release/apps/ADT/ADT_apps/src/ConnectedTriangles.cpp:10:  
In file included from /Users/pach/Documents/TAFF/OF/of_v0072_osx_release/apps/ADT/ADT_apps/src/DancerManager.h:11:  
In file included from /Users/pach/Documents/TAFF/OF/of_v0072_osx_release/apps/ADT/ADT_apps/../../../addons/ofxCv/src/ofxCv.h:20:  
In file included from ../../../addons/ofxOpenCv/libs/opencv/include/opencv2/opencv.hpp:47:  
In file included from ../../../addons/ofxOpenCv/libs/opencv/include/opencv2/core/core.hpp:58:  
/usr/include/c++/4.2.1/complex:639:5: error: 'inline' can only appear on functions  
    inline _Tp  
    ^  
/usr/include/c++/4.2.1/complex:640:5: error: variable 'sqrt' declared as a template  
    norm(const complex<_Tp>& __z)  
    ^  
/Users/pach/Documents/TAFF/OF/of_v0072_osx_release/apps/ADT/ADT_apps/../../../contributed_addons/ofxBox2d/src/ofxBox2dPolygonUtils.h:41:20: note: expanded from macro 'norm'  
#define norm(v)    sqrt(norm2(v))  // norm = length of vector  
                   ^  
In file included from /Users/pach/Documents/TAFF/OF/of_v0072_osx_release/apps/ADT/ADT_apps/src/ConnectedTriangles.cpp:10:  
In file included from /Users/pach/Documents/TAFF/OF/of_v0072_osx_release/apps/ADT/ADT_apps/src/DancerManager.h:11:  
In file included from /Users/pach/Documents/TAFF/OF/of_v0072_osx_release/apps/ADT/ADT_apps/../../../addons/ofxCv/src/ofxCv.h:20:  
In file included from ../../../addons/ofxOpenCv/libs/opencv/include/opencv2/opencv.hpp:47:  
In file included from ../../../addons/ofxOpenCv/libs/opencv/include/opencv2/core/core.hpp:58:  
/usr/include/c++/4.2.1/complex:640:10: error: expected expression  
    norm(const complex<_Tp>& __z)  
         ^  
/Users/pach/Documents/TAFF/OF/of_v0072_osx_release/apps/ADT/ADT_apps/../../../contributed_addons/ofxBox2d/src/ofxBox2dPolygonUtils.h:41:31: note: expanded from macro 'norm'  
#define norm(v)    sqrt(norm2(v))  // norm = length of vector  
                              ^  
/Users/pach/Documents/TAFF/OF/of_v0072_osx_release/apps/ADT/ADT_apps/../../../contributed_addons/ofxBox2d/src/ofxBox2dPolygonUtils.h:40:24: note: expanded from macro 'norm2'  
#define norm2(v)   dot(v,v)        // norm2 = squared length of vector  
                       ^  
In file included from /Users/pach/Documents/TAFF/OF/of_v0072_osx_release/apps/ADT/ADT_apps/src/ConnectedTriangles.cpp:10:  
In file included from /Users/pach/Documents/TAFF/OF/of_v0072_osx_release/apps/ADT/ADT_apps/src/DancerManager.h:11:  
In file included from /Users/pach/Documents/TAFF/OF/of_v0072_osx_release/apps/ADT/ADT_apps/../../../addons/ofxCv/src/ofxCv.h:20:  
In file included from ../../../addons/ofxOpenCv/libs/opencv/include/opencv2/opencv.hpp:47:  
In file included from ../../../addons/ofxOpenCv/libs/opencv/include/opencv2/core/core.hpp:58:  
/usr/include/c++/4.2.1/complex:640:34: error: expected ';' at end of declaration  
    norm(const complex<_Tp>& __z)  
                                 ^  
/usr/include/c++/4.2.1/complex:641:5: error: expected unqualified-id  
    {  
    ^  
/usr/include/c++/4.2.1/complex:1045:3: error: incomplete type 'std::complex<float>' named in nested name specifier  
  complex<float>::real()  
  ^~~~~~~~~~~~~~~~  
/usr/include/c++/4.2.1/complex:55:20: note: forward declaration of 'std::complex<float>'  
  template<> class complex<float>;  
                   ^  
/usr/include/c++/4.2.1/complex:1198:3: error: incomplete type 'std::complex<double>' named in nested name specifier  
  complex<double>::real()  
  ^~~~~~~~~~~~~~~~~  
/usr/include/c++/4.2.1/complex:56:20: note: forward declaration of 'std::complex<double>'  
  template<> class complex<double>;  
                   ^  
/usr/include/c++/4.2.1/complex:1351:3: error: incomplete type 'std::complex<long double>' named in nested name specifier  
  complex<long double>::complex(long double __r, long double __i)  
  ^~~~~~~~~~~~~~~~~~~~~~  
/usr/include/c++/4.2.1/complex:57:20: note: forward declaration of 'std::complex<long double>'  
  template<> class complex<long double>;  
                   ^  
/usr/include/c++/4.2.1/complex:1351:3: error: incomplete type 'std::complex<long double>' named in nested name specifier  
  complex<long double>::complex(long double __r, long double __i)  
  ^~~~~~~~~~~~~~~~~~~~~~  
/usr/include/c++/4.2.1/complex:57:20: note: forward declaration of 'std::complex<long double>'  
  template<> class complex<long double>;  
                   ^  
In file included from /Users/pach/Documents/TAFF/OF/of_v0072_osx_release/apps/ADT/ADT_apps/src/ConnectedTriangles.cpp:10:  
In file included from /Users/pach/Documents/TAFF/OF/of_v0072_osx_release/apps/ADT/ADT_apps/src/DancerManager.h:11:  
In file included from /Users/pach/Documents/TAFF/OF/of_v0072_osx_release/apps/ADT/ADT_apps/../../../addons/ofxCv/src/ofxCv.h:20:  
In file included from ../../../addons/ofxOpenCv/libs/opencv/include/opencv2/opencv.hpp:47:  
../../../addons/ofxOpenCv/libs/opencv/include/opencv2/core/core.hpp:1939:41: error: too many arguments provided to function-like macro invocation  
CV_EXPORTS double norm(const Mat& src1, int normType=NORM_L2);  
                                        ^  
../../../addons/ofxOpenCv/libs/opencv/include/opencv2/core/core.hpp:1941:41: error: too many arguments provided to function-like macro invocation  
CV_EXPORTS double norm(const Mat& src1, const Mat& src2, int normType=NORM_L2);  
                                        ^  
../../../addons/ofxOpenCv/libs/opencv/include/opencv2/core/core.hpp:1941:19: error: redefinition of 'norm'  
CV_EXPORTS double norm(const Mat& src1, const Mat& src2, int normType=NORM_L2);  
                  ^  
../../../addons/ofxOpenCv/libs/opencv/include/opencv2/core/core.hpp:1939:19: note: previous definition is here  
CV_EXPORTS double norm(const Mat& src1, int normType=NORM_L2);  
                  ^  
../../../addons/ofxOpenCv/libs/opencv/include/opencv2/core/core.hpp:1941:23: error: expected ';' after top level declarator  
CV_EXPORTS double norm(const Mat& src1, const Mat& src2, int normType=NORM_L2);  
                      ^  
                      ;  
../../../addons/ofxOpenCv/libs/opencv/include/opencv2/core/core.hpp:1941:78: error: expected ';' after top level declarator  
CV_EXPORTS double norm(const Mat& src1, const Mat& src2, int normType=NORM_L2);  
                                                                             ^  
                                                                             ;  
../../../addons/ofxOpenCv/libs/opencv/include/opencv2/core/core.hpp:1943:43: error: too many arguments provided to function-like macro invocation  
CV_EXPORTS_W double norm(const Mat& src1, int normType, const Mat& mask CV_WRAP_DEFAULT(Mat()));  
                                          ^  
../../../addons/ofxOpenCv/libs/opencv/include/opencv2/core/core.hpp:1943:21: error: redefinition of 'norm'  
CV_EXPORTS_W double norm(const Mat& src1, int normType, const Mat& mask CV_WRAP_DEFAULT(Mat()));  
                    ^  
../../../addons/ofxOpenCv/libs/opencv/include/opencv2/core/core.hpp:1939:19: note: previous definition is here  
CV_EXPORTS double norm(const Mat& src1, int normType=NORM_L2);  
                  ^  
../../../addons/ofxOpenCv/libs/opencv/include/opencv2/core/core.hpp:1943:25: error: expected ';' after top level declarator  
CV_EXPORTS_W double norm(const Mat& src1, int normType, const Mat& mask CV_WRAP_DEFAULT(Mat()));  
                        ^  
                        ;  
fatal error: too many errors emitted, stopping now [-ferror-limit=]  
20 errors generated.  
  

ok, after redownloading my git backup and compiling under 10.6, it’s working. I probably already had this problem or similar last spring, but don’t remember what I did to correct it.
Is there any way to makes a diff between two xCode project to see what’s different in the build parameters?
Going to bed for now. :slight_smile: