Compiling on Code::Blocks?
-
- Posts: 2
- Joined: Thu Feb 17, 2011 5:12 pm
- Contact:
Compiling on Code::Blocks?
Has anyone been able to compile Chipmunk on Code::Blocks with gcc? I keep getting compiler errors.
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: Compiling on Code::Blocks?
There is this thread: http://www.slembcke.net/forums/viewtopi ... ocks#p6052
You might also try generating a code blocks project from the cmake files.
You might also try generating a code blocks project from the cmake files.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
-
- Posts: 2
- Joined: Thu Feb 17, 2011 5:12 pm
- Contact:
Re: Compiling on Code::Blocks?
Here are the compiler errors:
C:\c++\ChipmunkLib\chipmunk.c:70: error: 'M_PI' undeclared (first use in this function)
C:\c++\ChipmunkLib\chipmunk.c:70: error: (Each undeclared identifier is reported only once
C:\c++\ChipmunkLib\chipmunk.c:70: error: for each function it appears in.)
C:\c++\ChipmunkLib\chipmunk.c: In function 'cpAreaForSegment':
C:\c++\ChipmunkLib\chipmunk.c:85: error: 'M_PI' undeclared (first use in this function)
Apparently M_PI is gone in C99, is Chipmunk really C99 compliant?
C:\c++\ChipmunkLib\chipmunk.c:70: error: 'M_PI' undeclared (first use in this function)
C:\c++\ChipmunkLib\chipmunk.c:70: error: (Each undeclared identifier is reported only once
C:\c++\ChipmunkLib\chipmunk.c:70: error: for each function it appears in.)
C:\c++\ChipmunkLib\chipmunk.c: In function 'cpAreaForSegment':
C:\c++\ChipmunkLib\chipmunk.c:85: error: 'M_PI' undeclared (first use in this function)
Apparently M_PI is gone in C99, is Chipmunk really C99 compliant?
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: Compiling on Code::Blocks?
It seems you are correct, and according to wikipedia M_PI was never actually part of the C standard math library anyway. Good to know. Apparently o
A simple define statement will fix that though:
#define M_PI 3.14159265358979323846264338327950288
I also committed the fix to trunk.
A simple define statement will fix that though:
#define M_PI 3.14159265358979323846264338327950288
I also committed the fix to trunk.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Who is online
Users browsing this forum: No registered users and 34 guests