SDL OS X framework and _main

Hello List

I just changed a project from using home baked SDL libs to SDL.framework and
now i get the old undefined _main error

I’ve been googling a bit, but can’t seem to find what I’m doing wrong.

I have a main.c which includes <SDL/SDL.h> and have main defines as

#ifdef __cplusplus
extern “C” int main(int argc, char *argv[])
#else
int main(int argc, char *argv[])
#endif

this file is compiled with gcc and linked with g++ using the following
flags:

-framework SDL -framework SDL_image -framework OpenGL -framework Cocoa
-framework Carbon

I don’t use Xcode, just Makefiles

what am I doing wrong?

/Jacob Kolding

Ah the joy of readme files… :slight_smile:
Added SDLMain.m from devel-lite to the final link command.On 5/12/07, Jacob Ole Juul Kolding <@Jacob_Kolding> wrote:

Hello List

I just changed a project from using home baked SDL libs to SDL.frameworkand now i get the old undefined _main error

I’ve been googling a bit, but can’t seem to find what I’m doing wrong.

I have a main.c which includes <SDL/SDL.h> and have main defines as

#ifdef __cplusplus
extern “C” int main(int argc, char *argv[])
#else
int main(int argc, char *argv[])
#endif

this file is compiled with gcc and linked with g++ using the following
flags:

-framework SDL -framework SDL_image -framework OpenGL -framework Cocoa
-framework Carbon

I don’t use Xcode, just Makefiles

what am I doing wrong?

/Jacob Kolding