Dealing with libraries

Posts: 1
Joined: 2009.06
Post: #1
Hi! I'm looking to port some of my games over to Mac!

I'm wondering how I'm supposed to handle porting libraries. I'm aware that I can use macports to compile universal binaries of various libraries, but how should I distribute them with my application?

My thoughts are:
1. Static linking against a universal library.
2. Simply compiling the source to these libraries along with the rest of my game.

How should this be done in the Mac world?

- Matt
Quote this message in a reply
Posts: 19
Joined: 2008.05
Post: #2

the way i did it was to create static lib's universal ones.
it seems to be the best solution from my point of view as including source to your project might cause it to be very messy.
I suggest to create lib's yourself, yes it is a bit of work with setting up the projects but once you do it right you can forget about it Smile
Quote this message in a reply
Posts: 1,563
Joined: 2003.10
Post: #3
Statically linking against universal libs is almost certainly the way to go. You _can_ dynamically link and distribute the dylib or framework in your app bundle, but it's pretty messy. Directly compiling the source into your app isn't particularly different from linking to a static library built in the same manner (a static library is literally just an archive of object files), but I personally like the separation boundary a static library gives you.
Quote this message in a reply
Post Reply