Crash, mac tiger, SDL_SetVideoMode

The framework dmg wouldnt work for me. so, i compiled sdl, make install it etc. I could of swore it ran before but right now it crashes on SDL_SetVideoMode
I am using mac osx tiger.
The last sdl func in my stack is SDL_QuartzWindow. The code i used is pasted below. I also pasted the output i saw. I tried running in both shell and carban app but both crash. below i paste my carbon output

int main()
{
SDL_Surface *screen;

if( SDL_Init(SDL_INIT_EVERYTHING) < 0 )
{
    printf("SDL error");
    return 1;
}
atexit(SDL_Quit);

screen = SDL_SetVideoMode(640, 480, 32, SDL_HWSURFACE | SDL_ANYFORMAT);----------------------------------------------------------------------------------------------------------------------------------------------------------------

[Session started at 2008-08-16 09:01:16 -0400.]
2008-08-16 09:01:18.733 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x131d9d0 of class NSLock autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.737 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x131e440 of class NSCFNumber autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.739 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x131e940 of class NSCFNumber autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.739 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x131e950 of class NSCFNumber autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.739 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x131eaa0 of class NSCFDictionary autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.739 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x131e9d0 of class NSIdEnumerator autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.739 carb[22734] *** _NSAutoreleaseNoPool(): Object 0xa3281fa8 of class NSCFString autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.739 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x131eb50 of class NSCFArray autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.740 carb[22734] *** _NSAutoreleaseNoPool(): Object 0xa3281e58 of class NSCFString autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.740 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x131c1b0 of class NSCFNumber autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.740 carb[22734] *** _NSAutoreleaseNoPool(): Object 0xa3281e68 of class NSCFString autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.740 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x131c1e0 of class NSCFNumber autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.740 carb[22734] *** _NSAutoreleaseNoPool(): Object 0xa3281e78 of class NSCFString autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.740 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x131a580 of class NSCFNumber autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.741 carb[22734] *** _NSAutoreleaseNoPool(): Object 0xa3281e88 of class NSCFString autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.741 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x131a580 of class NSCFNumber autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.741 carb[22734] *** _NSAutoreleaseNoPool(): Object 0xa3281e78 of class NSCFString autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.741 carb[22734] *** _NSAutoreleaseNoPool(): Object 0xa3281e88 of class NSCFString autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.741 carb[22734] *** _NSAutoreleaseNoPool(): Object 0xa3281e78 of class NSCFString autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.741 carb[22734] *** _NSAutoreleaseNoPool(): Object 0xa3281e88 of class NSCFString autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.741 carb[22734] *** _NSAutoreleaseNoPool(): Object 0xa3281e78 of class NSCFString autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.741 carb[22734] *** _NSAutoreleaseNoPool(): Object 0xa3281e78 of class NSCFString autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.741 carb[22734] *** _NSAutoreleaseNoPool(): Object 0xa3281e78 of class NSCFString autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.741 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x130c4b0 of class NSCFNumber autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.741 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x13163e0 of class NSCFArray autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.762 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x131a530 of class __NSFontTypefaceInfo autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.763 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x1336710 of class NSAffineTransform autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.763 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x1336890 of class NSFont autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.763 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x1336ca0 of class NSFont autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.865 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x1334240 of class NSCFArray autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.901 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x1333350 of class NSCFArray autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.915 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x1337c70 of class NSCFArray autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.932 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x1337d50 of class NSCFArray autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.937 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x1336ca0 of class NSFont autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.938 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x1337db0 of class NSCFString autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.939 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x1338a20 of class NSCFString autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.939 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x1309dd0 of class NSCFNumber autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.939 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x132dfd0 of class NSCalibratedWhiteColor autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.940 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x1339070 of class NSCFDictionary autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.940 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x132d8f0 of class NSCFArray autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.940 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x132cb30 of class NSCFArray autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.940 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x13397b0 of class NSCFArray autoreleased with no pool in place - just leaking
2008-08-16 09:01:18.940 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x13398e0 of class NSCFDictionary autoreleased with no pool in place - just leaking
2008-08-16 09:01:20.043 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x13d2e30 of class NSMutableParagraphStyle autoreleased with no pool in place - just leaking
2008-08-16 09:01:20.055 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x13d3af0 of class NSCFDictionary autoreleased with no pool in place - just leaking
2008-08-16 09:01:20.058 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x13d51a0 of class __NSFontTypefaceInfo autoreleased with no pool in place - just leaking
2008-08-16 09:01:20.058 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x13d5180 of class NSFont autoreleased with no pool in place - just leaking
2008-08-16 09:01:20.058 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x13d53f0 of class NSFont autoreleased with no pool in place - just leaking
2008-08-16 09:01:20.058 carb[22734] *** _NSAutoreleaseNoPool(): Object 0xa327de58 of class NSCFString autoreleased with no pool in place - just leaking
2008-08-16 09:01:20.119 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x13d3c00 of class _NSCachedBitmapImageRep autoreleased with no pool in place - just leaking
2008-08-16 09:01:20.134 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x131dd80 of class NSImage autoreleased with no pool in place - just leaking
2008-08-16 09:01:20.146 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x13d5be0 of class _NSCachedBitmapImageRep autoreleased with no pool in place - just leaking
2008-08-16 09:01:20.147 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x1317cb0 of class NSImage autoreleased with no pool in place - just leaking
2008-08-16 09:01:20.147 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x13d4500 of class _NSThemeCloseWidget autoreleased with no pool in place - just leaking
2008-08-16 09:01:20.147 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x13d53f0 of class NSFont autoreleased with no pool in place - just leaking
2008-08-16 09:01:20.148 carb[22734] *** _NSAutoreleaseNoPool(): Object 0xa327de58 of class NSCFString autoreleased with no pool in place - just leaking
2008-08-16 09:01:20.190 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x13d61b0 of class _NSCachedBitmapImageRep autoreleased with no pool in place - just leaking
2008-08-16 09:01:20.192 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x131e920 of class NSImage autoreleased with no pool in place - just leaking
2008-08-16 09:01:20.192 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x13d6060 of class _NSCachedBitmapImageRep autoreleased with no pool in place - just leaking
2008-08-16 09:01:20.192 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x1317c30 of class NSImage autoreleased with no pool in place - just leaking
2008-08-16 09:01:20.192 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x13d5e20 of class _NSThemeWidget autoreleased with no pool in place - just leaking
2008-08-16 09:01:20.193 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x13d53f0 of class NSFont autoreleased with no pool in place - just leaking
2008-08-16 09:01:20.193 carb[22734] *** _NSAutoreleaseNoPool(): Object 0xa327de58 of class NSCFString autoreleased with no pool in place - just leaking
2008-08-16 09:01:20.194 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x13d69a0 of class _NSCachedBitmapImageRep autoreleased with no pool in place - just leaking
2008-08-16 09:01:20.194 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x1337be0 of class NSImage autoreleased with no pool in place - just leaking
2008-08-16 09:01:20.197 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x13d6850 of class _NSCachedBitmapImageRep autoreleased with no pool in place - just leaking
2008-08-16 09:01:20.197 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x133ec00 of class NSImage autoreleased with no pool in place - just leaking
2008-08-16 09:01:20.197 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x13d6660 of class _NSThemeWidget autoreleased with no pool in place - just leaking
2008-08-16 09:01:20.198 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x13d6d10 of class NSCFString autoreleased with no pool in place - just leaking
2008-08-16 09:01:20.198 carb[22734] *** _NSAutoreleaseNoPool(): Object 0x13d5bb0 of class NSException autoreleased with no pool in place - just leaking
2008-08-16 09:01:20.198 carb[22734] *** Uncaught exception: Error (1002) creating CGSWindow


Try Chicktionary, a game that tests how many words you can form from the letters given. Find this and more puzzles at Live Search Games!
http://g.msn.ca/ca55/207

The last sdl func in my stack is SDL_QuartzWindow. The code i used is pasted

below. I also pasted the output i saw. I tried running in both shell and
carban app but both crash. below i paste my carbon output

int main()

I think your main is not substituted by the SDL macro, use:

int main(int argc, char *argv[])

and remember to link also with SDLmain (if you don’t have it in library
format just add SDLmain.m to your project).–
Bye,
Gabry