views:

20

answers:

1

I just built my program for MacOSX using GCC i.e. (gcc main.c). Are there any special build steps I should go through before I distribute the executable, or will it automatically work on all Intel MacOSX systems?

+1  A: 

The OS X versions your app supports is determined by your SDK selection and Deployment Target setting. The SDK you choose (10.4, 10.5, or 10.6) will determine what OS X version is required to run. In other words, if you choose 10.5 SDK, you won't be able to use 10.6-only routines because XCode/gcc won't know about them. Additionally, you can select a "Deployment Target" to specify the earliest OS X version you want to support (and use new APIs conditionally so as to properly support older systems.)

As for what APIs are available in what SDK, they are all clearly marked in the documentation and header files as to what OS they first appeared in.

Look here for the grizzly details: http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html

If you're not using XCode, look at the "Configuring a Makefile-Based Project" section for how to select an SDK and Deployment Target from the command-line.

Ken Aspeslagh