I am using C++ with the SDL Cocoa and Foundation framework on my mac os x. I get the following error 

```
Undefined symbols for architecture x86_64:
  "_SDL_main", referenced from:
      -[SDLMain applicationDidFinishLaunching:] in SDLMain.o
ld: symbol(s) not found for architecture x86_64

```

when I run the following code

```
#import <Foundation/Foundation.h>
#import <SDL/SDL.h>
#include "SDLMain.h"
int main(int argc, const char * argv[])
{
    SDL_Init(SDL_INIT_EVERYTHING);
    SDL_SetVideoMode(640,480,32,SDL_DOUBLEBUF);
    SDL_Event event;
    bool isRunning = true;
    while(SDL_PollEvent(&event)){
        if(event.type == SDL_QUIT){
            isRunning=false;
        }
    }

    SDL_Quit();
    return 0;
}

```

I have no idea what is wrong, although it seems that when I go into the SDLMain.m file and comment out this line of code

```
status = SDL_main (gArgc, gArgv);

```

the program compiles with no problems. However, it doesn't work. No window opens like its supposed to. Any ideas?