SDLMain: many problems on MacOSX

Hello,
I want to compile my SDL application without Project Builder.
I installed SDL binaries and SDL devel packages (1.2.7) for MacOSX.

When I compile my app with gcc, it didn’t find SDLMain.
I searched for libSDLMain.a on disk, but I didn’t find it.

Then I tried to compile SDL-1.2.7.tar.gz from source but,
after a successfull “./configure”,
I’ve got these errors on “make” step:

macosx/SDLMain.h:8: warning: could not use precompiled header ‘/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa-gcc3.p’, because:
macosx/SDLMain.h:8: warning: ‘Foundation/Foundation.h’ has different date than in precomp
macosx/SDLMain.h:8: warning: ‘Foundation/NSObjCRuntime.h’ has different date than in precomp
macosx/SDLMain.h:8: warning: ‘Foundation/NSArchiver.h’ has different date than in precomp
macosx/SDLMain.h:8: warning: ‘Foundation/NSCoder.h’ has different date than in precomp
macosx/SDLMain.h:8: warning: and others…
/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12: warning: could not use precompiled header ‘/System/Library/Frameworks/Foundation.framework/Headers/Foundation-gcc3.p’, because:
/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12: warning: ‘Foundation/NSObjCRuntime.h’ has different date than in precomp
/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12: warning: ‘Foundation/NSArchiver.h’ has different date than in precomp
/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12: warning: ‘Foundation/NSCoder.h’ has different date than in precomp
/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12: warning: ‘Foundation/NSObject.h’ has different date than in precomp

etc… etc… etc…

Can someone help me?

Thanks,
Enzo.

Hello,
I want to compile my SDL application without Project Builder.
I installed SDL binaries and SDL devel packages (1.2.7) for MacOSX.

When I compile my app with gcc, it didn’t find SDLMain.
That usually means that your source file in which you define the main()
function does not #include SDL.h. You must #include SDL.h in that
file, because it contains something like

#define main SDLMain

Then, the real main() is provided by libSDLmain.

Cheers,

MaxAm 28.04.2004 um 13:37 schrieb Enzo:

Max Horn wrote:

That usually means that your source file in which you define the main()
function does not #include SDL.h. You must #include SDL.h in that
file, because it contains something like

#define main SDLMain

Then, the real main() is provided by libSDLmain.

apple:~/source/battle$>make
c++ -c -I…/didlib -Wall battle.cc
c++ -I…/didlib -o battle battle.o -L/usr/local/lib -Wl -framework SDL
-framework SDL_mixer -framework SDL_ttf -framework Cocoa
ld: Undefined symbols:
_main
make: *** [battle] Error 1

Yes, as you said, the real main() is provided by libSDLmain,
but I don’t have libSDLmain.a, and I can’t compile it from SDL sources
(I get some errors, written in my previous mail).

Cheers,
Enzo.