Weird codeblocks 007 build errors

hi

the opencv example in 007 builds and runs fine, as does the alladdonsexample.

I copied the allAddonsExample and added files to the project from an old 0062 project, but now I get these weird build errors relating to opencv…

…\addons\ofxOpenCv\libs\opencv\include\opencv2\core\core.hpp|1939|error: macro “norm” passed 2 arguments, but takes just 1|
…\addons\ofxOpenCv\libs\opencv\include\opencv2\core\core.hpp|1941|error: macro “norm” passed 3 argument|
…\addons\ofxOpenCv\libs\opencv\include\opencv2\core\core.hpp|1943|error: macro “norm” passed 3 arguments, but takes just 1|
…\addons\ofxOpenCv\libs\opencv\include\opencv2\core\core.hpp|1946|error: macro “norm” passed 4 arguments, but takes just 1|
…\addons\ofxOpenCv\libs\opencv\include\opencv2\core\core.hpp|3299|error: macro “norm” passed 2 arguments, but takes just 1|
…\addons\ofxOpenCv\libs\opencv\include\opencv2\core\operations.hpp|905|error: macro “norm” passed 3 arguments, but takes just 1|
…\addons\ofxOpenCv\libs\opencv\include\opencv2\core\operations.hpp|915|error: macro “norm” passed 4 arguments, but takes just 1|
…\addons\ofxOpenCv\libs\opencv\include\opencv2\core\core.hpp|1941|error: redefinition of ‘double cv::norm’|
…\addons\ofxOpenCv\libs\opencv\include\opencv2\core\core.hpp|1939|error: ‘double cv::norm’ previously declared here|
…\addons\ofxOpenCv\libs\opencv\include\opencv2\core\core.hpp|1943|error: redefinition of ‘double cv::norm’|
…\addons\ofxOpenCv\libs\opencv\include\opencv2\core\core.hpp|1939|error: ‘double cv::norm’ previously declared here|
…\addons\ofxOpenCv\libs\opencv\include\opencv2\core\core.hpp|1945|error: redefinition of ‘double cv::norm’|
…\addons\ofxOpenCv\libs\opencv\include\opencv2\core\core.hpp|1939|error: ‘double cv::norm’ previously declared here|
…\addons\ofxOpenCv\libs\opencv\include\opencv2\core\core.hpp|3299|error: redefinition of ‘double cv::norm’|
…\addons\ofxOpenCv\libs\opencv\include\opencv2\core\core.hpp|1939|error: ‘double cv::norm’ previously declared here|
…\addons\ofxOpenCv\libs\opencv\include\opencv2\core\operations.hpp|905|error: ‘cv::norm’ declared as an ‘inline’ variable|
…\addons\ofxOpenCv\libs\opencv\include\opencv2\core\operations.hpp|905|error: template declaration of ‘double cv::norm’|
…\addons\ofxOpenCv\libs\opencv\include\opencv2\core\operations.hpp|905|warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x|
…\addons\ofxOpenCv\libs\opencv\include\opencv2\core\operations.hpp|907|error: expected primary-expression before ‘double’|
…\addons\ofxOpenCv\libs\opencv\include\opencv2\core\operations.hpp|907|error: expected ‘}’ before ‘double’|
…\addons\ofxOpenCv\libs\opencv\include\opencv2\core\operations.hpp|908|error: expected unqualified-id before ‘for’|
…\addons\ofxOpenCv\libs\opencv\include\opencv2\core\operations.hpp|908|error: expected constructor, destructor, or type conversion before ‘<’ token|
…\addons\ofxOpenCv\libs\opencv\include\opencv2\core\operations.hpp|908|error: expected constructor, destructor, or type conversion before ‘++’ token|
…\addons\ofxOpenCv\libs\opencv\include\opencv2\core\operations.hpp|910|error: expected unqualified-id before ‘return’|
…\addons\ofxOpenCv\libs\opencv\include\opencv2\core\operations.hpp|915|error: ‘norm’ declared as an ‘inline’ variable|
…\addons\ofxOpenCv\libs\opencv\include\opencv2\core\operations.hpp|915|error: template declaration of ‘double norm’|
…\addons\ofxOpenCv\libs\opencv\include\opencv2\core\operations.hpp|915|warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x|
…\addons\ofxOpenCv\libs\opencv\include\opencv2\core\operations.hpp|917|error: expected primary-expression before ‘if’|
…\addons\ofxOpenCv\libs\opencv\include\opencv2\core\operations.hpp|917|error: expected ‘}’ before ‘if’|
…\addons\ofxOpenCv\libs\opencv\include\opencv2\core\operations.hpp|925|error: expected unqualified-id before ‘if’|
…\addons\ofxOpenCv\libs\opencv\include\opencv2\core\operations.hpp|934|error: expected unqualified-id before ‘return’|
…\addons\ofxOpenCv\libs\opencv\include\opencv2\core\operations.hpp|935|error: expected declaration before ‘}’ token|

and these errors…

c:\program files\codeblocks\mingw\bin…\lib\gcc\mingw32\4.4.1\include\c++\complex|70|error: template declaration of ‘_Tp std::sqrt’|
c:\program files\codeblocks\mingw\bin…\lib\gcc\mingw32\4.4.1\include\c++\complex|70|error: expected primary-expression before ‘const’|
c:\program files\codeblocks\mingw\bin…\lib\gcc\mingw32\4.4.1\include\c++\complex|70|error: expected primary-expression before ‘const’|
c:\program files\codeblocks\mingw\bin…\lib\gcc\mingw32\4.4.1\include\c++\complex|70|error: there are no arguments to ‘dot’ that depend on a template parameter, so a declaration of ‘dot’ must be available|
c:\program files\codeblocks\mingw\bin…\lib\gcc\mingw32\4.4.1\include\c++\complex|70|note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)|
c:\program files\codeblocks\mingw\bin…\lib\gcc\mingw32\4.4.1\include\c++\complex|654|error: ‘std::sqrt’ declared as an ‘inline’ variable|
c:\program files\codeblocks\mingw\bin…\lib\gcc\mingw32\4.4.1\include\c++\complex|654|error: template declaration of ‘_Tp std::sqrt’|
c:\program files\codeblocks\mingw\bin…\lib\gcc\mingw32\4.4.1\include\c++\complex|654|error: expected primary-expression before ‘const’|
c:\program files\codeblocks\mingw\bin…\lib\gcc\mingw32\4.4.1\include\c++\complex|654|error: expected primary-expression before ‘const’|
c:\program files\codeblocks\mingw\bin…\lib\gcc\mingw32\4.4.1\include\c++\complex|654|error: there are no arguments to ‘dot’ that depend on a template parameter, so a declaration of ‘dot’ must be available|

unfortunately I can’t post the project online, but if anyone has any thoughts just seeing the errors above, that would be great.

thanks

ever figure this out? I am refactoring a project, getting the same error and I am thinking that there is some weird conflict name that manifests itself in this way

edit: seems to be something in conflict with ofxBox2d?

I am also having this trouble right now and pretty much the same error messages…

I don’t use box2d though. opencv is the only addon I use… Any suggestions?

I am having the same issue.
Is there still any solution?
thanks

Having the same problem.
I am working with box2d inside a openCV example. The particles are working, but the errors appear when I activate openCv for the motion capture…

Could anyone give a feedback on it?

in testApp.h having #include “ofxOpenCv.h”
at the top of my include list solved the issue for me

Thanks for much, fixed it for me