Linking to Chipmunk using FreeBASIC

Official forum for the Chipmunk2D Physics Library.

Linking to Chipmunk using FreeBASIC

Postby MrOz » Wed Dec 21, 2011 11:40 am

Hey guys, I don't know if this is an issue with FreeBASIC, or with chipmunk, so maybe you gents have an idea.

Anywho, this is the issue: When I'm compiling with multiple modules/files, I get a lot of errors about multiple references to all the chipmunk functions.

FreeBASIC works similarly to gcc, so when I do something like this:
fbc source.file -l chipmunk

Everything is fine, but if I do something like:
fbc source1.file source2.file -l chipmunk
It starts to complain about multiple references

I've also tried compiling and not linking until the end like this:
fbc source1.file -c
fbc source2.file -c
fbc *.o -l chipmunk -x "sometest.exe"

Again, the multiple references issue crops up again.

Is this an issue in the C-dialect versions, or is there perhaps something wrong with my translated headers (I did the translation by hand, but don't think I left anything important out).

Any insight into this would be super duper :)
-Oz
MrOz
 
Posts: 36
Joined: Tue Mar 02, 2010 11:36 pm

Re: Linking to Chipmunk using FreeBASIC

Postby slembcke » Wed Dec 21, 2011 1:31 pm

Is it using the C headers in some way? I have a lot of static inline functions in them that FreeBASIC might be trying to generate code for in every source module.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: Linking to Chipmunk using FreeBASIC

Postby MrOz » Wed Dec 21, 2011 1:50 pm

Nope, it's only using my translated headers, which have the inline functions translated properly.
:?
MrOz
 
Posts: 36
Joined: Tue Mar 02, 2010 11:36 pm

Re: Linking to Chipmunk using FreeBASIC

Postby Dave » Sat Oct 04, 2014 8:39 pm

Hey guys. I know this is an old topic, but I was wondering of anyone is still maintaining this port? I have an old version here and I'd like to start using the new features. Also, I ran into those duplicated issues, and since FreeBASIC doesn't support inline functions, I used private functions.
Dave
 
Posts: 35
Joined: Mon Sep 29, 2008 10:43 pm

Re: Linking to Chipmunk using FreeBASIC

Postby MrOz » Sat Oct 04, 2014 9:37 pm

I have been occasionally updating my repository as people request or as I need it. It's a little behind now, but if you need something beyond 6.1, I can update to 7.0, just let me know.

-MrOz
MrOz
 
Posts: 36
Joined: Tue Mar 02, 2010 11:36 pm

Re: Linking to Chipmunk using FreeBASIC

Postby Dave » Fri Jun 14, 2019 3:48 pm

Hello, sorry about posting in such an old thread, but it felt like a bad thing to start a new one with the exact same topic.
Anyway, is there any information on a current FreeBASIC compatible version of Chipmunk?
I've been looking around, but the only stuff I can find is really old.
Thanks.
Dave
 
Posts: 35
Joined: Mon Sep 29, 2008 10:43 pm

Re: Linking to Chipmunk using FreeBASIC

Postby MrOz » Tue Jul 02, 2019 7:34 am

Hi Dave,

Sadly, I haven't touched FreeBASIC in a number of years.

You can check out some work I did a long time ago here: https://github.com/mrozbarry/Chipmunk-P ... /freebasic

The version is 7 years old, _but_ it has a snapshot of chipmunk from 7 years ago, too, so you should have something compatible.

That said, I have no idea what state I left the repository in, and it may not work at all, but it should give you a place to start.

Porting C libraries to FreeBASIC isn't too bad, FreeBASIC is pretty close to ansi-C.

Have fun!
- Oz
MrOz
 
Posts: 36
Joined: Tue Mar 02, 2010 11:36 pm


Return to Chipmunk2D Physics

Who is online

Users browsing this forum: No registered users and 1 guest

cron