Dealing with libraries

Nibbie
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?

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

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
Moderator
Posts: 1,562
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