New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Creating Universal Binaries with XCode Tools


Post Reply New Thread Subscribe

 
Thread Tools
mac57

 
mac57's Avatar
 
Member Since: Apr 29, 2006
Location: St. Somewhere
Posts: 4,560
mac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant future
Mac Specs: iMac 27" 3.4 GHz, 256 GB SSD, 2 TB HDD, 8 GB RAM

mac57 is offline
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.

My Macs: iMac 27" 3.4 GHz, Mac Pro 3.2 GHz, PowerMac G5 Quad 2.5 GHz, G4 Cube with 1.2 GHz Upgrade
My iStuff: 64GB iPhone 5, 64GB iPad4, 30GB iPod Video, 16GB iPod Touch
My OS': Mac OS X Lion, Mac OS X Snow Leopard, Mac OS X Tiger, Mac OS 9.2.2, openSUSE 10.3
I was on the Mac-Forums honor roll for September 2007
QUOTE Thanks
Logan
Guest
 
Posts: n/a

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.
QUOTE Thanks
Logan
Guest
 
Posts: n/a

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.
QUOTE Thanks
mac57

 
mac57's Avatar
 
Member Since: Apr 29, 2006
Location: St. Somewhere
Posts: 4,560
mac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant futuremac57 has a brilliant future
Mac Specs: iMac 27" 3.4 GHz, 256 GB SSD, 2 TB HDD, 8 GB RAM

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

My Macs: iMac 27" 3.4 GHz, Mac Pro 3.2 GHz, PowerMac G5 Quad 2.5 GHz, G4 Cube with 1.2 GHz Upgrade
My iStuff: 64GB iPhone 5, 64GB iPad4, 30GB iPod Video, 16GB iPod Touch
My OS': Mac OS X Lion, Mac OS X Snow Leopard, Mac OS X Tiger, Mac OS 9.2.2, openSUSE 10.3
I was on the Mac-Forums honor roll for September 2007
QUOTE Thanks

Post Reply New Thread Subscribe


« Skip Profile--Please Help | terminal is messed up »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Universal Binaries for Widgets? rs2sensen Schweb's Lounge 2 02-01-2006 12:34 PM
universal final cut.. thelox714 Movies and Video 2 01-21-2006 12:06 AM
setting up a powermac blue and white for pro tools free.. sean1978 Music, Audio, and Podcasting 3 10-03-2005 09:50 AM
Xcode developer tools updated Murlyn OS X - Development and Darwin 0 11-04-2003 06:09 PM

All times are GMT -4. The time now is 10:14 PM.

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

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?