At 21:15 Uhr -0500 02.12.2001, Darrell Walisser wrote:
If you choose to do this, you must understand that you lose the Mac OS
"face" on the application. It will have no dock icon, and will have to
be launched from the command line.
Uhm, I think it would not work right at all, unless you add mac
specific code to your own main (basically, you would copy the code from
libsdlmain… where is the point in that?!?). There are various setup
steps done in our main() that are rather critical (like setting up an
auto release pool).
Yes, I am getting a bunch of errors related to those - mainly
2001-12-03 21:38:13.978 beam *** _NSAutoreleaseNoPool(): Object
0x1039d30 of class NSCFArray autoreleased with no pool in place - just
I agree. In fact, for maximum portability, you should always use
libsdlmain, otherwise you will run into troubles on other systems, too,
Also remember you can statically link libsdlmain.a so that libSDL is
the only runtime dependency. Our revised sdlmain code does not require
a .app bundle or various other standard resources,
OK, maybe this is what I need to do. Is this the 1.2.3 version? Any
pointers on what I need to change (is it enough to get rid of -framework
Just to clarify this - it does require an .app bundle if you want it to
be double-clickable from the Finder.
I hear you both, i just don’t think that you are describing what I want
That is: compile a shared library (esdl from sourceforge) which will be
loaded into the Virtual Machine of the erlang language at runtime and
provide access to SDL functions which will create a window at some point
later and do cool stuff with it.
There is already an OS X Makefile with the existing esdl distro which I
am told by the guy who wrote it worked against libsdl-1.2.1. From a
quick look through cvsweb this was before all the extra stuff for
Project Builder and Cocoa was added.
Anyhow - I have managed to get esdl to compile using the Downloaded
SDL-1.2.3 binary dev kit. This loads successfully into the erlang VM but
running the test routine (beginning with a call to SDL setVideoMode)
results in a stream of errors:
kCGErrorInvalidConnection : CGSNewWindow: Invalid connection
21:38:13.958 beam _NXCreateWindow: error creating window (1002)
kCGErrorInvalidConnection : CGSSetWindowProperty: Invalid connection
kCGErrorInvalidConnection : CGSInvalidateWindowShadow: Invalid connection
CGSSetWindowAlpha: Invalid connection
CGSLockWindowRectBits: Invalid window
kCGErrorFailure : Cannot create window/bitmap context device.
and so on.
I’ve traced these calls back into the Cocoa Appkit so either I need to
go without Cocoa or add supporting code for this lot. I think I’d like
to have the option, starting with no Cocoa.
I’ll try going back to 1.2.1 and see if I can get anything working. I’l
also have another go at removing the Cocoa stuff from configure.in using
the one from 1.2.1 as a guide.
Hmm, this is looking trickier than it appeared.
SeanOn Monday, December 3, 2001, at 07:14 pm, Max Horn wrote: