Mac Forums

Mac Forums (http://www.mac-forums.com/forums/)
-   OS X - Development and Darwin (http://www.mac-forums.com/forums/os-x-development-darwin/)
-   -   Creating Universal Binaries with XCode Tools (http://www.mac-forums.com/forums/os-x-development-darwin/36414-creating-universal-binaries-xcode-tools.html)

mac57 06-15-2006 04:25 PM

Creating Universal Binaries with XCode Tools
 
The XCode tools install the gcc compiler, which seems to be the C/C++ compiler that is used on the Mac. Is there a way to make this compiler and associated tool chain produce universal binaries? I know from past Linux experience that gcc has a gazillion options. Before I start digging into them, I was wondering whether anyone could point me at a simple reference that would explain how to use these tools to create universal binaries.

In this case, I am just building ncurses-based Terminal.app applications, but I would like them to be compatible with both PPC and Intel Macs. Thanks.

Logan 06-20-2006 11:34 AM

This one talks about Aspyr doing the move over (for like Sims 2 and Doom 3 etc)
http://developer.apple.com/business/...ket/aspyr.html

This one tells the steps you need to do to prepare for universal binaries
http://developer.apple.com/macosx/ad...lbinaries.html

on the bottom of the last link it tells you "For more information".. and has 3 links or so.

Hope that it is useful for you.

Logan 06-20-2006 11:39 AM

Scanning over it seems the major factor is that bytes and variable handling are of different sizes depending on architexture.

Boolean is 1 byte on x86 machines, 4 bytes on PPC

A long double is 16 bytes on both architectures, but only 80 bits are significant in long double data types on Intel-based Macintosh computers.

there's just a ton of really simple yet potentially tedius tweaks, and from what I scanned over it appears that when your code is universal binary ready, you'll know just simply after compiling on a universal binary-compatible machine by going to get info and looking at the application's type.

Be sure you're using the latest compiler too. :P

mac57 06-20-2006 06:35 PM

Sounds like gcc 4.0 builds universal binaries by default. I will have to check into this I guess. Thanks for the pointers!


All times are GMT -4. The time now is 08:42 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.