vanderlin / ofxBox2d

Openframework wrapper for box2d

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Working with both ofxCv and ofxOpenCv

phs1919 opened this issue · comments

When working both ofxCv and ofxOpenCv, the following error message occurs.
However, if only either of them is included, it works fine.

screen shot 2013-10-18 at 11 04 04 pm

When working both ofxCv and ofxOpenCv, the following error message occurs.

I assume you mean both ofxBox2d and ofxOpenCv?

There are macros are in conflict (with the same names, min/max). In my app, I "solved" it by making sure ofxBox2d.h was included last, after ofxOpenCv.h. Would be nice if the macros had a "b2d" prefix or something, or (better) used inline functions with a Box2d namespace, or (better still) used std::min and std::max.

Glen.

On Oct 19, 2013, at 5:05 AM, phs1919 notifications@github.com wrote:

When working both ofxCv and ofxOpenCv, the following error message occurs.
However, if only either of them is included, it works fine.


Reply to this email directly or view it on GitHub.

Hi Glen,

Thanks for your comments. I actually included ofxBox2d.h at the last after ofxOpenCv.h and ofxCv.h. I used std::min and std::max in the source file and now it works. I also agree that Box2d namespace would make it compatible with other addons like this case. Thanks!

fixed