news forum live chat wiki


___

About Compiling For Mac OS X

Posted on January 3rd, 2008 by tjw

We have done quite a bit of work towards unraveling mysteries presented by the recent Xcode (2.5 and 3.0) and Mac OS X (10.5) releases. Here is the rundown of the current state of things. If you want maximum compatibility in the Universal Binary you create, your build system needs to meet the following criteria:

  • Must be running Mac OS X 10.4 (Tiger)
  • Must be using XCode 2.3, XCode 2.4(untested), or XCode 2.5
  • Must have MacOSX10.2.8.sdk, MacOSX10.3.9.sdk, and MacOSX10.4u.sdk installed. (These come with XCode, but you may have to install them manually)

The make-macosx-ub.sh script should detect all of this for you. The resulting binary should work on all Mac OS X 10.2, 10.3, 10.4, and 10.5 systems.

You can still build a Universal Binary when running Mac OS X 10.5 using XCode 2.5 or 3.0, but the best you can do is compatibility with Mac OS X 10.4 and 10.5 systems.



5 Responses to “About Compiling For Mac OS X”

  1. ianthetechie Says:

    For some reason I can’t get it to build on Leopard. I installed the proper SDK’s and everything. I am using Xcode 3.0. Using the make-macosx-ub.sh script I get the following:
    ld64: warning: option -m is obsolete and being ignored
    ld: duplicate symbol _alEnable in build/release-darwin-ppc/client/snd_openal.o and build/release-darwin-ppc/client/qal.o

    make[2]: *** [build/release-darwin-ppc/ioquake3-smp.ppc] Error 1
    make[1]: *** [targets] Error 2
    make: *** [release] Error 2

    I modified the script to not build the PPC version since I’m on an intel macbook and I get the following:
    LD build/release-darwin-i386/tools/q3cpp
    LD build/release-darwin-i386/tools/q3lcc
    Q3LCC code/cgame/cg_main.c
    cpp: :1 Illegal -D or -U argument
    make[2]: *** [build/release-darwin-i386/baseq3/cgame/cg_main.asm] Error 1
    make[1]: *** [targets] Error 2
    make: *** [release] Error 2

    Any help?

  2. tjw Says:

    First make sure you are using the latest SVN version since there have been big changes to the universal build script lately.

    Second, since you have modified the script it will be difficult to diagnose this.

    The .sh script is for building a universal binary with maximum compatibility for the purpose of distribution. If you only want a binary for running on your own system, don’t use the .sh script at all, just run ‘make’ instead. This won’t build the whole .app structure, but as long as you have an existing ioquake3.app bundle laying around you can just copy the binary you build into it.

  3. dank Says:

    I used Xcode 3.0 as well but with no MacOSX10.2.8 SDK’s. Everythink is working great. Now… why dont we have widescreen resolutions ?

    Cheers.

  4. zachary Says:

    dank: check out the help page, you can use widescreen resolutions.

  5. BC Says:

    Hi all!

    Somebody can tell me a good software for create statistics of “quake 3” logs?
    I play with “Team arena”.

    Thanks

Leave a Reply