Can't get demo projects to compile

Official forum for the Chipmunk2D Physics Library.
Post Reply
saucermancer
Posts: 8
Joined: Tue Oct 11, 2011 5:38 am
Contact:

Can't get demo projects to compile

Post by saucermancer »

Hi all,

I'm having a problem compiling the latest Chipmunk (6.0.2) on MSVC 2008 - Everything is set up nicely with the included project and solution files, and after including stdint.h, I am running into a linker error. I've put the build log up at http://pastebin.com/0J43j7Ci ... hope to have some input on this. :)
aisman
Posts: 145
Joined: Tue Mar 04, 2008 2:21 am
Contact:

Re: Can't get demo projects to compile

Post by aisman »

remove all demo *.h and +.c sources from the project.
And now: add all EXISTING files again to the project.

Let run the compiler again.
Chipmunk4PB: The fastest way to write games together with PureBasic and the Chipmunk physics engine.
saucermancer
Posts: 8
Joined: Tue Oct 11, 2011 5:38 am
Contact:

Re: Can't get demo projects to compile

Post by saucermancer »

Thanks for the response, but unfortunately its still not working - I've removed and re-added the files as listed in the original project file, but it still throws up a linking error. Currently, the demo project is configured to compile ChipmunkDebugDraw.h, ChipmunkDemo.h, ChipmunkDemo.c and Joints.c, and it still does not work ( build log is at http://pastebin.com/NnZCLBN0 ) - the project properties and settings are untouched, and I've only included stdint.h so that the chipmunk library compiles (and is fine in Debug mode, I see the chipmunk.lib file being generated).

I've also tried to create a new project using the HelloWorld example in the documentation, and linking to chipmunk.lib with the appropriate include files, but it throws me an error as well ( build log is at http://pastebin.com/uquWws9J ), which doesn't make sense, since chipmunk.h is the only file that's needed for everything to be included in?

EDIT: Tried to compile v6.0.1, and I ended up with errors as well ( http://pastebin.com/7T96HUti )

EDIT 2: Never mind, got it to work. For some strange reason *all* demo source code - including code for the chipmunk project - must be removed and re-added, as per the post by aisman (thanks alot! :D) in the 6.0.1 release thread

EDIT 3: Okay, v6.0.1 works fine, but v6.0.2 fails to link ( http://pastebin.com/3ZpJVbx6 )

EDIT 4: Now this is interesting, overwriting source and includes for the chipmunk library but using demo code from v6.0.1 works fine, but using v6.0.2 demo code it fails to link
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Can't get demo projects to compile

Post by slembcke »

Hmm. That's annoying. I tested out building it on my netbook with MSVC10 before sending out the release. I'll have to look at it again.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
aisman
Posts: 145
Joined: Tue Mar 04, 2008 2:21 am
Contact:

Re: Can't get demo projects to compile

Post by aisman »

He is using VS2008: Maybe the project file is not updated?
Chipmunk4PB: The fastest way to write games together with PureBasic and the Chipmunk physics engine.
hamlatzis
Posts: 2
Joined: Wed Jan 04, 2012 6:14 am
Contact:

Re: Can't get demo projects to compile

Post by hamlatzis »

I've just downloaded the library and the demo (v6.0.3) for windows and having similar problems.

Inside the header file chipmunk_types.h there is: #include <stdint.h> but this file doesn't exist anywhere on my system (windows) it only exists under the CodeSourcery folder witch I have for building applications for the HP's TouchPad running webOS.

Searching the net I've found out that MS Visual Studio 2003 upwards is missing this file although it has been added again with MSVC 2010

I'm using either the MS Visual Studio 2005 Prof. or the MS Visual Studio 2008 Express, both of them don't include this header file.

PS
I've found from google projects to download the missing header file, but now I've found out that other files are missing one of them is the chipmunk.def in order to create the .dll and .lib file so even if I delete from the demo project the missing files I still cannot build the library.

Is this library actually builtable? I'm thinking of looking for another physic library
:(
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Can't get demo projects to compile

Post by slembcke »

Ugh. Why does Microsoft find it so hard to support a 13 year old C standard? Does it only work in MSVC 2010 maybe?

Remove the stdint.h include and replace the use of uintptr_t with size_t or unsigned long. I'm not quite sure what a safe equivalent on Windows is.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Post Reply

Who is online

Users browsing this forum: Heise IT-Markt [Crawler] and 5 guests