Hello,
I am new to programming, so please correct me if I say something dumb.
I am attempting to write a dll wrapper for a small physics library called Chipmunk Physics:
http://code.google.com/p/chipmunk-physics/The library is written in C, and uses C99 implementation. My wrapper code is in C++, and what I have so far I am sure is all syntactically valid code. I can compile the library alone, but not together with my wrapper code.
Right now, I'm getting errors like this:
... Chipmunk2GM\CODE\src\cpArbiter.h|47|error: `cpHashValue' does not name a type|
... Chipmunk2GM\CODE\src\cpArbiter.h|51|error: ISO C++ forbids declaration of `hash' with no type|
All of the errors are in the library's header files.
The library is in C99, which has some specifications that are ONLY allowed in C99. My wrapper code, as I said, is in C++. How do I get Code::Blocks to compile the library as C99 C, and my wrapper code as C++?
I'd be happy to upload my project file and the source if anyone is willing to take a look at them!
Many thanks!