Hello
I'm very interesting by your project, so I decided to try it on my NDS.
I already made some little games on it, using DevkitPro. I also use a high-level library you may know, PALib (http://www.palib.info/).
So I tried to mix PALib and Box2D for NDS.
Including PALib makes no problem, it compiles and works fine.
But when I include Box2D.h, with all Box2D source code in a "Source" directory to match with the .h declarations, and launch compiles, it makes a lot of errors and stop.
How can you link / use with library ? I think there's a compilator option I missed somewhere...
Thanks for your help (and sorry for my approximative english...)
EDIT : Here's the errors during the compilation :
I'm very interesting by your project, so I decided to try it on my NDS.
I already made some little games on it, using DevkitPro. I also use a high-level library you may know, PALib (http://www.palib.info/).
So I tried to mix PALib and Box2D for NDS.
Including PALib makes no problem, it compiles and works fine.
But when I include Box2D.h, with all Box2D source code in a "Source" directory to match with the .h declarations, and launch compiles, it makes a lot of errors and stop.
How can you link / use with library ? I think there's a compilator option I missed somewhere...
Thanks for your help (and sorry for my approximative english...)
EDIT : Here's the errors during the compilation :
Code:
In file included from d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/b
2Shape.h:22,
from d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/b
2CircleShape.h:22,
from d:/NDS/Box2d_DS/include/Box2D.h:36,
from d:/NDS/Box2d_DS/source/main.cpp:3:
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:4
6: warning: ignoring #pragma warning
d:/NDS/Box2d_DS/include/../Box2D/Source/Common/b2Settings.h:50: error: conflicti
ng declaration 'typedef class Fixed float32'
d:/devkitPro/libnds/include/nds/jtypes.h:114: error: 'float32' has a previous de
claration as 'typedef float float32'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:
In member function 'float32 b2Vec2::Length() const':
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:1
23: error: request for member 'sqrt' in '((((float)((const b2Vec2*)this)->b2Vec2
::x) * ((float)((const b2Vec2*)this)->b2Vec2::x)) + (((float)((const b2Vec2*)thi
s)->b2Vec2::y) * ((float)((const b2Vec2*)this)->b2Vec2::y)))', which is of non-c
lass type 'float'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:
In member function 'b2Mat22 b2Mat22::Invert() const':
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
49: error: invalid operands of types 'float32' and 'int' to binary 'operator<<'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
49: error: invalid operands of types 'float32' and 'int' to binary 'operator<<'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
50: error: invalid operands of types 'float32' and 'int' to binary 'operator<<'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
50: error: invalid operands of types 'float32' and 'int' to binary 'operator<<'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
55: error: invalid operands of types 'float32' and 'int' to binary 'operator<<'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
55: error: invalid operands of types 'float' and 'int' to binary 'operator<<'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
56: error: invalid operands of types 'float' and 'int' to binary 'operator<<'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
56: error: invalid operands of types 'float32' and 'int' to binary 'operator<<'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
64: error: invalid operands of types 'float32' and 'int' to binary 'operator>>'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
64: error: invalid operands of types 'float' and 'int' to binary 'operator>>'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
65: error: invalid operands of types 'float' and 'int' to binary 'operator>>'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
65: error: invalid operands of types 'float32' and 'int' to binary 'operator>>'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:
In member function 'b2Vec2 b2Mat22::Solve(const b2Vec2&) const':
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
88: error: invalid operands of types 'const float32' and 'int' to binary 'operat
or<<'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
88: error: invalid operands of types 'const float32' and 'int' to binary 'operat
or<<'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
89: error: invalid operands of types 'const float32' and 'int' to binary 'operat
or<<'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
89: error: invalid operands of types 'const float32' and 'int' to binary 'operat
or<<'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
94: error: invalid operands of types 'float32' and 'int' to binary 'operator<<'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
95: error: invalid operands of types 'float32' and 'int' to binary 'operator<<'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:3
03: error: invalid operands of types 'float32' and 'int' to binary 'operator>>'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:3
04: error: invalid operands of types 'float32' and 'int' to binary 'operator>>'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/b2Shape.h: In member fu
nction 'virtual float32 b2Shape::ComputeSubmergedArea(const b2XForm&, const b2Ve
c2&, float32) const':
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/b2Shape.h:180: warning:
statement has no effect
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/b2Shape.h:180: warning:
statement has no effect
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/b2Shape.h:180: warning:
statement has no effect
d:/NDS/Box2d_DS/include/../Box2D/Source/Dynamics/b2Body.h: At global scope:
d:/NDS/Box2d_DS/include/../Box2D/Source/Dynamics/b2Body.h:437: warning: 'void b2
Body::WakeUp()' was used before it was declared inline
d:/NDS/Box2d_DS/include/../Box2D/Source/Dynamics/b2Body.h:226: warning: previous
non-inline declaration here
make[1]: *** [main.o] Error 1
make: *** [build] Error 2
2Shape.h:22,
from d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/b
2CircleShape.h:22,
from d:/NDS/Box2d_DS/include/Box2D.h:36,
from d:/NDS/Box2d_DS/source/main.cpp:3:
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:4
6: warning: ignoring #pragma warning
d:/NDS/Box2d_DS/include/../Box2D/Source/Common/b2Settings.h:50: error: conflicti
ng declaration 'typedef class Fixed float32'
d:/devkitPro/libnds/include/nds/jtypes.h:114: error: 'float32' has a previous de
claration as 'typedef float float32'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:
In member function 'float32 b2Vec2::Length() const':
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:1
23: error: request for member 'sqrt' in '((((float)((const b2Vec2*)this)->b2Vec2
::x) * ((float)((const b2Vec2*)this)->b2Vec2::x)) + (((float)((const b2Vec2*)thi
s)->b2Vec2::y) * ((float)((const b2Vec2*)this)->b2Vec2::y)))', which is of non-c
lass type 'float'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:
In member function 'b2Mat22 b2Mat22::Invert() const':
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
49: error: invalid operands of types 'float32' and 'int' to binary 'operator<<'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
49: error: invalid operands of types 'float32' and 'int' to binary 'operator<<'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
50: error: invalid operands of types 'float32' and 'int' to binary 'operator<<'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
50: error: invalid operands of types 'float32' and 'int' to binary 'operator<<'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
55: error: invalid operands of types 'float32' and 'int' to binary 'operator<<'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
55: error: invalid operands of types 'float' and 'int' to binary 'operator<<'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
56: error: invalid operands of types 'float' and 'int' to binary 'operator<<'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
56: error: invalid operands of types 'float32' and 'int' to binary 'operator<<'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
64: error: invalid operands of types 'float32' and 'int' to binary 'operator>>'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
64: error: invalid operands of types 'float' and 'int' to binary 'operator>>'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
65: error: invalid operands of types 'float' and 'int' to binary 'operator>>'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
65: error: invalid operands of types 'float32' and 'int' to binary 'operator>>'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:
In member function 'b2Vec2 b2Mat22::Solve(const b2Vec2&) const':
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
88: error: invalid operands of types 'const float32' and 'int' to binary 'operat
or<<'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
88: error: invalid operands of types 'const float32' and 'int' to binary 'operat
or<<'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
89: error: invalid operands of types 'const float32' and 'int' to binary 'operat
or<<'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
89: error: invalid operands of types 'const float32' and 'int' to binary 'operat
or<<'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
94: error: invalid operands of types 'float32' and 'int' to binary 'operator<<'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:2
95: error: invalid operands of types 'float32' and 'int' to binary 'operator<<'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:3
03: error: invalid operands of types 'float32' and 'int' to binary 'operator>>'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/../../Common/b2Math.h:3
04: error: invalid operands of types 'float32' and 'int' to binary 'operator>>'
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/b2Shape.h: In member fu
nction 'virtual float32 b2Shape::ComputeSubmergedArea(const b2XForm&, const b2Ve
c2&, float32) const':
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/b2Shape.h:180: warning:
statement has no effect
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/b2Shape.h:180: warning:
statement has no effect
d:/NDS/Box2d_DS/include/../Box2D/Source/Collision/Shapes/b2Shape.h:180: warning:
statement has no effect
d:/NDS/Box2d_DS/include/../Box2D/Source/Dynamics/b2Body.h: At global scope:
d:/NDS/Box2d_DS/include/../Box2D/Source/Dynamics/b2Body.h:437: warning: 'void b2
Body::WakeUp()' was used before it was declared inline
d:/NDS/Box2d_DS/include/../Box2D/Source/Dynamics/b2Body.h:226: warning: previous
non-inline declaration here
make[1]: *** [main.o] Error 1
make: *** [build] Error 2
