Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Forquare1

macrumors newbie
Original poster
Jun 22, 2008
20
0
Hi guys,

I've made my first application :D I coded it on my MacBook running Leopard. Then tried it on my girlfriends iBook running Tiger. It didn't work on my girlfriends Mac. If that because it's PPC, or because it's on Tiger?

Also, my program just contains windows, text boxes and buttons. Surely this is standard stuff that Tiger has too? So I could go ahead and release it for both Tiger and Leopard. And presumably make it Universal Binary too?

Thanks all,

Ben
 

kpua

macrumors 6502
Jul 25, 2006
294
0
You should make sure to target the 10.4 SDK if you want it to run on Tiger, and yes, you need to make it a Universal Binary for it to be able to run on both PPC and Intel.
 

Forquare1

macrumors newbie
Original poster
Jun 22, 2008
20
0
Thanks,

I presume I can do that by setting the "Active SDK) to 10.4, so it runs on Tiger and Leopard.

Then to make it Universal Binary, do I just set "Active Architecture" to PPC, so it compiles for that, but Intel machines can still read it?

Thanks very much for your last reply.

Ben
 

Cromulent

macrumors 604
Oct 2, 2006
6,817
1,102
The Land of Hope and Glory
Then to make it Universal Binary, do I just set "Active Architecture" to PPC, so it compiles for that, but Intel machines can still read it?

Well, no. Universal bineries are two applications in one package. So you would need to compile it for PPC and Intel. The Apple documentation should explain it pretty well.
 

Sayer

macrumors 6502a
Jan 4, 2002
981
0
Austin, TX
Actually if you make a PowerPC version it will run okay on an intel Mac. For best performance you should make a Universal Binary.
 

locoputo

macrumors newbie
Dec 25, 2008
28
0
little help please. Im compiling on my intel macbook for my old ibook running 10.4

what do I need to add to ./configure ?

thanks for any advice
 

gnasher729

Suspended
Nov 25, 2005
17,980
5,566
Hi guys,

I've made my first application :D I coded it on my MacBook running Leopard. Then tried it on my girlfriends iBook running Tiger. It didn't work on my girlfriends Mac. If that because it's PPC, or because it's on Tiger?

Also, my program just contains windows, text boxes and buttons. Surely this is standard stuff that Tiger has too? So I could go ahead and release it for both Tiger and Leopard. And presumably make it Universal Binary too?

A few principles: First, when you build your application, you have to decide what is the lowest operating system that it will run on. Look for "Deployment Target" in your build settings. If you want the program to run on 10.4, you need to switch it to 10.4 instead of "Compiler Default" or "10.5".

Second, you have to decide which features you want to be able to use. You choose that under "Base SDK". If you match the "Deployment Target", like 10.4 SDK and 10.4 Deployment Target, then you can't use any 10.5 features, but on the other hand your code will run fine on 10.5. If you don't match them, like 10.5 SDK and 10.4 Deployment Target, then you have to be careful: You can use 10.5 features, but your code will crash if you use them on a 10.4 system.

Under "Architectures", you want to select ppc + i386; that will run on all Macs. By default, debugging versions are compiled only for your own machine, so don't give debugging versions out, but only release versions.

After reading your second post: It is the "Deployment Target" which decides where your code runs.

Deployment Target 10.4: The OS allows you to run on 10.4 Systems or newer.
Deployment Target 10.5: The OS allows you to run on 10.5 Systems or newer.

10.4 SDK: You can use 10.4 features only. If you try to use 10.5 features, it won't compile. If it compiles, it runs on 10.4 and 10.5.
10.5 SDK: You can use 10.5 features. 10.5 features work on 10.5; if you try to use them on 10.4, the program will crash.

Let's say there is a function void TenFiveFunction (void) which was introduced in 10.5.

10.4 SDK: The call will not compile.
10.5 SDK + running on 10.4: The call will compile and crash if it is executed.
10.5 SDK + running on 10.5: The call will compile and work.

Correct way to use it:

if (&TenFiveFunction == NULL) {
// The function is not available.
} else {
TenFiveFunction ();
}
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.