OsX.1 and SDL

Ok the error I get is _main? Shouldn’t int main(int argc, char *argv[])
work?

Ok the error I get is _main? Shouldn’t int main(int argc, char *argv[])
work?

You need to link to libsdlmain.a. It contains the necessary startup code
for SDL, in order to create a OS X application with a menu bar and one
which is launchable from the Finder. This code in libsdlmain.a requires
linking to the Objective-C library. Don’t worry, you’ll still be able to
write all the C++ you want, you don’t have to write any ObjC. The two
can be used in the same application, just like C, C++, and assembly can
be used in the same application.

libsdlmain.a contains the real main(int argc, char**argv); procedure.
This executes first; it initializes SDL, fixes up command line args,
sets up the menu bar, sets the working directory, and finally calls the
main procedure you defined in your C/C++ code.

If you get more errors compiling, also add “-lobjc -framework Foundation
-framework AppKit” to the OTHER_LDFLAGS in ProjectBuilder.On Thursday, November 8, 2001, at 11:01 PM, JUGGERNAUT wrote:

I used sherlock and searched my HD and no luck finding the libsdlmain.a
file?