Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > How do I make a universal app?

How do I make a universal app?
Thread Tools
Addicted to MacNN
Join Date: Nov 2002
Location: Seattle, WA
Status: Offline
Reply With Quote
Feb 17, 2007, 01:27 AM
 
Ok I feel like the stupidest guy on here, but how do I make my app universal?

When I compile it from a Mac Pro, it's intel-only, and when I compile it from my G5, it's ppc-only. This is with both "ppc" and "intel" check boxes checked.

building a brand new empty project makes it universal by this route, so what is my old project doing wrong? I've tried cleaning my target.
     
Mac Elite
Join Date: Aug 2001
Status: Offline
Reply With Quote
Feb 17, 2007, 03:15 AM
 
You need to build in Release mode instead of Development. You also need this for the app to run anywhere but your computer.
     
Addicted to MacNN
Join Date: Nov 2002
Location: Seattle, WA
Status: Offline
Reply With Quote
Feb 17, 2007, 08:15 AM
 
I'm pretty sure I already tried that, but I just went to check again and now I'm deeper in the hole than ever before.

I can't build, because it always fails with "Command /Developer/Private/jam failed with exit code 1." This happens to me a lot, but I've always been able to clean my target which leads to that error plus another one which allows me to find something to actually fix. No such luck today.

Can someone please explain this error to me?

Also, the project I'm trying to build is open source, if that helps:
http://metahoot.3ivx.com

edit: I should say I've been working with my internal version of the code. Re-downloading the above version* does reproduce the Universal problem, but not the Jam Tool one (though I would very much like to know what the heck that thing is doing wrong). Also I'm using Xcode 2.4.1 in 10.4.8 on a 2x2.5 G5. Thanks to anyone who can help me.

*the above version compiles if the take "mhSpriteHelper" from the distributed app's resources folder and put it in the build folder, then every time it errors out on one of QT's .h files (again, WTF, it didn't used to do that when I wrote it 3 years ago), comment out that line or function in the .h file.
(Last edited by Uncle Skeleton; Feb 17, 2007 at 08:44 AM. )
     
Addicted to MacNN
Join Date: Nov 2002
Location: Seattle, WA
Status: Offline
Reply With Quote
Feb 17, 2007, 07:51 PM
 
Ok I have a new idea, since my project is probably corrupted in some way.

Is there a way to take my compiled Intel-only and ppc-only binaries and combine them in a Universal manually? This is a cocoa .app. Thanks for any ideas.
     
Mac Elite
Join Date: Aug 2001
Status: Offline
Reply With Quote
Feb 17, 2007, 08:50 PM
 
Yeah, there is. Check out the 'lipo' command.
     
Mac Enthusiast
Join Date: Aug 1999
Location: Calgary, Alberta, Canada
Status: Offline
Reply With Quote
Feb 18, 2007, 11:02 AM
 
Did you select the Universal SDK?
     
Fresh-Faced Recruit
Join Date: Aug 2005
Status: Offline
Reply With Quote
Feb 18, 2007, 03:14 PM
 
Originally Posted by Uncle Skeleton View Post
I can't build, because it always fails with "Command /Developer/Private/jam failed with exit code 1." Can someone please explain this error to me?
You have a non-native target in your project. Jam is the build tool that Project Builder, Xcode's predecessor, uses. Xcode will use jam for projects that were originally created in Project Builder.

Choose Project > Upgrade to Native Target to convert your old target to a native target. You need a native target to build a universal app. Upgrading to a native target will eliminate the "jam failed with exit code 1" error message.

Upgrading to a native target does not necessarily mean your project will build without errors. If you have errors when you build your project, choose Build > Build Results to open the build results window. The top of the window should show the build errors.

Below the listing of the build errors is four small buttons. Clicking the third button will show the build transcript. The build transcript shows every low-level step Xcode took when your building your project, which will help you figure out why the project won't build.
Mark Szymczyk
Author, Xcode Tools Sensei
http://www.meandmark.com
     
Addicted to MacNN
Join Date: Nov 2002
Location: Seattle, WA
Status: Offline
Reply With Quote
Feb 18, 2007, 07:40 PM
 
Originally Posted by King Chung Huang View Post
Did you select the Universal SDK?
I don't know, what is that?
     
Addicted to MacNN
Join Date: Nov 2002
Location: Seattle, WA
Status: Offline
Reply With Quote
Feb 18, 2007, 07:43 PM
 
Originally Posted by szymczyk View Post
You have a non-native target in your project. Jam is the build tool that Project Builder, Xcode's predecessor, uses. Xcode will use jam for projects that were originally created in Project Builder.

Choose Project > Upgrade to Native Target to convert your old target to a native target. You need a native target to build a universal app. Upgrading to a native target will eliminate the "jam failed with exit code 1" error message.

Upgrading to a native target does not necessarily mean your project will build without errors. If you have errors when you build your project, choose Build > Build Results to open the build results window. The top of the window should show the build errors.

Below the listing of the build errors is four small buttons. Clicking the third button will show the build transcript. The build transcript shows every low-level step Xcode took when your building your project, which will help you figure out why the project won't build.
Thanks, I'm trying that now. So it can build an intel binary (from whatever type of project/target I have), but not a universal one? Why is that?
     
Fresh-Faced Recruit
Join Date: Aug 2005
Status: Offline
Reply With Quote
Feb 18, 2007, 10:47 PM
 
Take a look at Apple's guide to building universal binaries.
Mark Szymczyk
Author, Xcode Tools Sensei
http://www.meandmark.com
     
   
Thread Tools
Forum Links
Forum 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 On
Top
Privacy Policy
All times are GMT -5. The time now is 02:46 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2