I’m trying to run a simple SDL test under OSX 10.6 but it fails, saying:
*** Terminating app due to uncaught exception
’NSInternalInconsistencyException’, reason: ‘Error (1002) creating
CGSWindow’
*** call stack here
terminate called after throwing an instance of ‘NSException’
I’m trying to run a simple SDL test under OSX 10.6 but it fails, saying:
*** Terminating app due to uncaught exception
‘NSInternalInconsistencyException’, reason: ‘Error (1002) creating
CGSWindow’
*** call stack here
terminate called after throwing an instance of ‘NSException’
Versions:
OSX 10.6.5
SDL 1.2.14 from MacPorts
Have I missed something ?
Try the SDL.framework from the official binary DMG with the starter
Xcode projects from the dev-extras DMG. I haven’t seen your error. I
just tried the basic Xcode template project and the OpenGL Atlantis
template project and both worked fine for me under 10.6.5/1.2.14.
But i’m not using XCode here, XCode examples works but I don’t want to use it.On Sat, Dec 11, 2010 at 12:06 PM, Eric Wing wrote:
I’m trying to run a simple SDL test under OSX 10.6 but it fails, saying:
? *** Terminating app due to uncaught exception
‘NSInternalInconsistencyException’, reason: ‘Error (1002) creating
CGSWindow’
? *** call stack here
? terminate called after throwing an instance of ‘NSException’
Versions:
?- OSX 10.6.5
?- SDL 1.2.14 from MacPorts
Have I missed something ?
Try the SDL.framework from the official binary DMG with the starter
Xcode projects from the dev-extras DMG. I haven’t seen your error. I
just tried the basic Xcode template project and the OpenGL Atlantis
template project and both worked fine for me under 10.6.5/1.2.14.
main() enters, calls run() which initialises SDL then run() returns and
main() returns (without actually returning an exit code). The SDL event
loop never entered.
If some threads are started when SDL talks to OpenGL (don’t know if that
happens or not) which would need to be synchronised by the event loop,
that might be an issue.
Also, does SDL return any error code from either calls?
Do you know which one fails?
(Note that I have no idea what libsdlmain is, I only ever linked against
libsdl on Linux)
main() enters, calls run() which initialises SDL then run() returns and
main() returns (without actually returning an exit code). The SDL event
loop never entered.
If some threads are started when SDL talks to OpenGL (don’t know if that
happens or not) which would need to be synchronised by the event loop,
that might be an issue.
Also, does SDL return any error code from either calls?
Do you know which one fails?
(Note that I have no idea what libsdlmain is, I only ever linked against
libsdl on Linux)
Seems to be an OSx specific thing.On Sat, Dec 11, 2010 at 1:52 PM, Zolt?n K?csi wrote:
I’m trying to run a simple SDL test under OSX 10.6 but it fails, saying:
int main(int argc, char *argv) {
run();
}
#include <SDL/SDL.h>
I think the problem is that main is declared before SDL.h is included, you
should include SDL before main so that SDL substitutes main() with
SDL_main() and does it’s internal initializations. You should also link with
SDLmain.On Wed, Dec 8, 2010 at 12:09 PM, Lagrange Marc wrote:
–
Ing. Gabriele Greco, DARTS Engineering
Tel: +39-0105761240 Fax: +39-0105760224
s-mail: Via G.T. Invrea 14 - 16129 GENOVA (ITALY)
sdl-config --cflags --libs is the recommended way, atleast on GCC.
Everyone loves a good one liner, especially if it works the same on
all systems.
SDL makes it so easy, programmers don’t even have to worry about cc parameters.On Sat, Dec 11, 2010 at 7:52 AM, Zolt?n K?csi wrote: