[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #32383] NSClassFromString returns nil on MinGw if the string class
From: |
Nicola Pero |
Subject: |
[bug #32383] NSClassFromString returns nil on MinGw if the string class is in a shared library and hasn't yet been used |
Date: |
Mon, 07 Feb 2011 23:57:52 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101209 CentOS/3.6-2.el5.centos Firefox/3.6.13 |
Follow-up Comment #2, bug #32383 (project gnustep):
It certainly isn't a bug in NSClassFromString(), but I do wonder
if it is a bug in the compiler/linker or not. :-(
On my GNU/Linux, the example works; the class is loaded
and available automatically even when not explicitly referenced.
So the compiler/linker seem to be behaving differently on
GNU/Linux and Windows, which suggests one of the two may
need to be changed.
On GNU/Linux it seems that the compiler/linker make sure that
all classes from the shared libraries that you link are loaded
in automatically. This is great, but it is not efficient.
Presumably classes should only be loaded when/if they are
referenced ? Does it really matter ?
If we like the existing GNU/Linux behaviour, maybe we
should look at how we make sure that it works on the same way on
MinGW.
--
Anyhow, Brock,
making sure all symbols in DLLs are loaded is a typical
Windows problem. Have you tried referencing symbols in the DLL
in your program to make sure it is loaded up ? Eg, some people
add a global function pointer variable to their program, and
initialize it by pointing it to a function in the DLL they are
loading, to make sure the DLL is loaded when the program starts
up.
Let me know if you have any luck with such a workaround. ;-)
Thanks
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?32383>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #32383] NSClassFromString returns nil on MinGw if the string class is in a shared library and hasn't yet been used, Brock Erwin, 2011/02/07
- [bug #32383] NSClassFromString returns nil on MinGw if the string class is in a shared library and hasn't yet been used, Richard Frith-Macdonald, 2011/02/07
- [bug #32383] NSClassFromString returns nil on MinGw if the string class is in a shared library and hasn't yet been used,
Nicola Pero <=
- [bug #32383] NSClassFromString returns nil on MinGw if the string class is in a shared library and hasn't yet been used, matt rice, 2011/02/08
- [bug #32383] NSClassFromString returns nil on MinGw if the string class is in a shared library and hasn't yet been used, Brock Erwin, 2011/02/08
- [bug #32383] NSClassFromString returns nil on MinGw if the string class is in a shared library and hasn't yet been used, Brock Erwin, 2011/02/08
- [bug #32383] NSClassFromString returns nil on MinGw if the string class is in a shared library and hasn't yet been used, Richard Frith-Macdonald, 2011/02/08
- [bug #32383] NSClassFromString returns nil on MinGw if the string class is in a shared library and hasn't yet been used, matt rice, 2011/02/08
- [bug #32383] NSClassFromString returns nil on MinGw if the string class is in a shared library and hasn't yet been used, Nicola Pero, 2011/02/09