[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Win32 DLL's and libobjc (was: install make, libobjc, base on cygwin/

From: Michael Scheibler
Subject: Re: Win32 DLL's and libobjc (was: install make, libobjc, base on cygwin/mingw32)
Date: Thu, 1 Mar 2001 10:20:40 +0100

I found some great great problem with libobjc. I tried to load a bundle with
NSBundle. On Windows it is a DLL. After debugging I found out, why my
program crashes:

- gnustep-base, objc-load.m, objc_load_module:

_objc_load_callback = objc_load_callback;

- libobjc, objc-api.h:
** This is a hook which is called by __objc_exec_class every time a class
** or a category is loaded into the runtime.  This may e.g. help a
** dynamic loader determine the classes that have been loaded when
** an object file is dynamically linked in.
extern void (*_objc_load_callback)(Class class, Category* category);

When libobjc is a DLL and gnustep-base is a DLL, this assignment in
objc-load.m causes the program to abort immediately. I don't know if there
is any possibility to make _objc_load_callback changeable from another DLL.
I used following hack for this specific situation, but I think there are
more of those hooks.

- gnustep-base, objc-load.m, objc_load_module:

Instead of assignment:
And later:

- libobjc, objc-api.h:
void __objc_set_load_callback(void (*callbackFunction)(Class, Category*));

- libobjc, class.c:
void __objc_set_load_callback(void (*callbackFunction)(Class, Category*))
  _objc_load_callback = callbackFunction;

- libobjc, libobjc.def:


----- Original Message -----
From: "Adam Fedor" <address@hidden>
To: "Michael Scheibler" <address@hidden>
Sent: Thursday, March 01, 2001 4:16 AM
Subject: Re: install make, libobjc, base on cygwin/mingw32

> Thanks for pointing out these problems, I don't get to test MINGW that
> often.
> I've fixed them.
> Let me know if you get the gnustep-base DLL to work. I've never gotten
> that to work. I'm not sure why.
> --
> Adam Fedor, Digital Optics            | Fudd's law of opposition: Push
> address@hidden  http://www.doc.com     | something hard enough, and it
> address@hidden  http://www.gnustep.org | will fall over.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]