SDL 1.2.12 & Leopard (target 10.3.9 or better)

I’ve a problem to make my leopard (intel) built binaries work on 10.3.9
PPC. Fortunately I still have a tiger machine so I’m not stuck :slight_smile:

Anyway here is the problem.

#include “SDL.h”
#include <stdio.h>

int main(int argc, char *argv[])
{
printf(“Hello world…\n”);
}

I compile with something like that:

gcc -arch ppc -arch i386 -o test main.c SDLMain.m -framework SDL
-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4
-I/Library/Frameworks/SDL.framework/Headers -framework Cocoa

(The -mmacosx-version-min=10.x is needed only in leopard, in tiger I
used to build without it, I’ve tried both with x=3 and x=4 on leopard).

SDLMain.m is the stock one of 1.2.12 distribution.

Anyway my app crashes inside SDLMain.m, in CustomApplication(), I’m
doing something wrong? If it’s a bug in SDL there is some patch to fix this?–
Bye,
Gabry

Well, I’m a little confused about what you’re doing.

So first, Intel stuff doesn’t work on anything older than 10.4. 10.3
was PowerPC exclusively.

Second, if you are serious about running on 10.3, you should set the
min version to 10.3
-mmacosx-version-min=10.3

There are various mailing list threads that try to explain the proper
use of min version and SDKs. Here is today’s:

Also, a note. We compile the official SDL.framework with gcc 3.3 on
the PowerPC side. I think it should still work though for C if you are
using gcc 4.0. But I’m mentioning it in case it is a factor.

Have you tried using our SDL template projects and building the
default application there and running it on 10.3.9? (I haven’t tried
it recently so I don’t know if it works.) I think we had set it up so
binaries produced would work as far back as 10.2 though.

-EricOn 11/19/07, Gabriele Greco <gabriele.greco at darts.it> wrote:

I’ve a problem to make my leopard (intel) built binaries work on 10.3.9
PPC. Fortunately I still have a tiger machine so I’m not stuck :slight_smile:

Anyway here is the problem.

#include “SDL.h”
#include <stdio.h>

int main(int argc, char *argv[])
{
printf(“Hello world…\n”);
}

I compile with something like that:

gcc -arch ppc -arch i386 -o test main.c SDLMain.m -framework SDL
-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4
-I/Library/Frameworks/SDL.framework/Headers -framework Cocoa

(The -mmacosx-version-min=10.x is needed only in leopard, in tiger I
used to build without it, I’ve tried both with x=3 and x=4 on leopard).

SDLMain.m is the stock one of 1.2.12 distribution.

Anyway my app crashes inside SDLMain.m, in CustomApplication(), I’m
doing something wrong? If it’s a bug in SDL there is some patch to fix this?


Bye,
Gabry


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

E. Wing wrote:

Second, if you are serious about running on 10.3, you should set the
min version to 10.3
-mmacosx-version-min=10.3

10.3 and gcc 3.3 are needed only if you want to be compatible with
10.3.x with x < 9, I need only the 10.3.9 compatibility, so I use

-mmacosx-version-min=10.4

and the universal binary SDK (I’ve read this in an apple dev note, unfortunately I cannot find it right now…).

This anyway WORKS perfectly if I compile on a 10.4 machine but STOP
working if the build system is 10.5 :frowning:

Have you tried using our SDL template projects and building the
default application there and running it on 10.3.9? (I haven’t tried
it recently so I don’t know if it works.) I think we had set it up so
binaries produced would work as far back as 10.2 though.

No, cause I don’t use xcode but a simple makefile, the minimal example
I posted (empty main) don’t work, the program crashes inside SDLMain.m
(in CustomApplication()).

Maybe the method I used to build universal libraries was wrong and
worked just as “side effect” on 10.4? :slight_smile:

Bye,
Gabry

with XCode and SDL I’m making an application that takes a textfile as
input and executes “the game”. It can be invoked from the command line
(terminal) or from BBEdit while you’re editing your game-text. Now the
trouble starts : the output from the executable will contain errors
with linenumber & description. This gets parsed in an applescript
which then tells it to BBedit so these lines can be highlited.

the problem is : SDL will generate a warning when teh
SDL_Setvideomode call is invoked :

2007-11-27 13:48:56.467 Martians2[1864:10b] Warning once: This
application, or a library it uses, is using NSQuickDrawView, which has
been deprecated. Apps should cease use of QuickDraw and move to Quartz.

is there ANY way NOT to get this warning ? I’ve been staring at GCC &
LD documentation & XCode flags for hours now, but can’t find a way to
suppress this

manyyyyyyyyy thanks in advance !

2007-11-27 13:48:56.467 Martians2[1864:10b] Warning once: This
application, or a library it uses, is using NSQuickDrawView, which has
been deprecated. Apps should cease use of QuickDraw and move to Quartz.

is there ANY way NOT to get this warning ? I’ve been staring at GCC &

File a bug in radar telling Apple to stop friggin’ doing that? :slight_smile:

That message is generated in a system framework, we can’t stop it from
doing that, short of rewriting the Mac port to not use QuickDraw.

The good news is: we’ve done that. There’s a 1.2 patch floating around
somewhere, and 1.3 uses OpenGL even for 2D surfaces.

(Where IS that 1.2 patch? Can we get that into Subversion if it isn’t
too invasive?)

–ryan.

2007-11-27 13:48:56.467 Martians2[1864:10b] Warning once: This

(Hmm…I should probably sort my inbox by date and not subject before
replying…sorry to restir a thread from NOVEMBER.)

–ryan.