libsdl: basic test case fails on osx 10.6.3

John DeNero denero at berkeley.edu
Thu Jul 1 17:00:14 PDT 2010


Hi,

I've run into a snag with the libsdl port.  I had no problems during
installation.  I was also able to build the following simple test
case:

http://pastebin.com/YkmzghJR

Using:

gcc `sdl-config --cflags` sdl.c `sdl-config --libs`
OR
gcc -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE sdl.c
-L/opt/local/lib -lSDLmain -lSDL -framework Cocoa

However, running the test case gives no graphical output and the
following trace.  Any ideas?

OSX: 10.6.3
MacPorts: 1.9.1
libsdl: 1.2.14

Thanks,
John

TRACE:
2010-07-01 16:50:11.145 a.out[1812:903] *** Terminating app due to
uncaught exception 'NSInternalInconsistencyException', reason: 'Error
(1002) creating CGSWindow'
*** Call stack at first throw:
(
	0   CoreFoundation                      0x00007fff88c1bd24
__exceptionPreprocess + 180
	1   libobjc.A.dylib                     0x00007fff85cf90f3
objc_exception_throw + 45
	2   CoreFoundation                      0x00007fff88c1bb47
+[NSException raise:format:arguments:] + 103
	3   CoreFoundation                      0x00007fff88c1bad4
+[NSException raise:format:] + 148
	4   AppKit                              0x00007fff81a54ace
_NSCreateWindowWithOpaqueShape2 + 473
	5   AppKit                              0x00007fff819e9069 -[NSWindow
_commonAwake] + 1214
	6   AppKit                              0x00007fff819e5d56 -[NSWindow
_commonInitFrame:styleMask:backing:defer:] + 1501
	7   AppKit                              0x00007fff819e49e2 -[NSWindow
_initContent:styleMask:backing:defer:contentView:] + 1396
	8   AppKit                              0x00007fff819e446b -[NSWindow
initWithContentRect:styleMask:backing:defer:] + 42
	9   libSDL-1.2.0.dylib                  0x0000000100038ced
-[SDL_QuartzWindow initWithContentRect:styleMask:backing:defer:] + 285
	10  libSDL-1.2.0.dylib                  0x00000001000361c4
QZ_SetVideoMode + 1076
	11  libSDL-1.2.0.dylib                  0x000000010002d33f
SDL_SetVideoMode + 527
	12  a.out                               0x0000000100000eee run + 39
	13  a.out                               0x0000000100000ec5 main + 25
	14  a.out                               0x0000000100000ea4 start + 52
	15  ???                                 0x0000000000000001 0x0 + 1
)
terminate called after throwing an instance of 'NSException'
Abort trap


More information about the macports-users mailing list