Hi Ralf,
Ralf Wildenhues wrote:
Hi John,
* John Pye wrote on Tue, Mar 14, 2006 at 06:26:31AM CET:
I just saw this thread and I have been experiencing similar problems.
http://lists.gnu.org/archive/html/libtool/2006-03/msg00011.html
Well, if you have the same problem, then using `-no-undefined' should
fix it for you. ;-)
No, according the the posting: '-no-undefined' means that "OUTPUT-FILE
does not depend on any other libraries."
My problem is the opposite: I know for sure that it *does* depend on
other libraries.
What I'm doing is running a DLL (_ascend.dll) via Python (wrapped with
SWIG). This DLL in turn needs to load some of its own DLLs for external
plugin code.
At runtime, right? With LoadLibrary, or libltdl, or..?
The code that loads the plugins is at the link below. It's really old,
but I have been cleaning it up. On Windows the loading is done with
LoadLibrary. But this doesn't matter! My problem is that GCC on MinGW
won't let me compile my library with the unresolved symbols.
https://pse.cheme.cmu.edu/svn-view/ascend/code/trunk/base/generic/utilities/ascDynaLoad.c?rev=228&view=markup
I wanted to use libltdl here but there was some resistance from other
members of the development team. Anyway it sounds as though it probably
wouldn't help me...
The external plugin DLLs contain unresolved symbols that are present in
_ascend.dll and are supposed to be resolved at load-time. The symbols
are involving in 'registering' the plugin back with the main
application, and providing error reporting capabilities.
Under Linux this all works fine. Under Windows, I can't make libtool
compile my library with these unresolved symbols.
Right. Just won't work that way on Windows, though. You could factor
out all common code into a common library, for example. Or factor the
common code into a plugin. Or provide pointers for the callbacks.
I need you to clarify that last bit. Are you saying that I can't compile
a DLL with unresolved symbols that get resolved at LoadLibrary-time?
That is certainly what appears to be said on the edll page.
But it was my understanding from the libtool manual that this could be
accomodated by suitable settings with libtool. For example, section 9.1
makes no mention of *not being able to do anything in particular in
Windows. (In fact there are only a handful of mentions of 'windows',
'win32' and 'cygwin' in the whole manual...). Ok, so maybe I was
dreaming. But maybe we could have some explanation of these issues in
the manual?
I haven't tried the ideas listed on http://edll.sourceforge.net/ yet,
by the way. If they work, libltdl may benefit from integrating some
of them (optionally). If anybody has experience with them, I'd be
glad to learn about it.
It definitely sounds interesting. Otherwise I will have to go with some
kind of technique that passes some function pointers from my _ascend.dll
to my plugin DLL when it is being loaded. Which isn't so hard I guess.
Thanks Ralf,
Cheers
JP
_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool