Mail Archives: cygwin/1999/08/20/17:29:39
James Stern <jsternitg AT yahoo DOT com> writes:
> This is one of the alternatives I tried (#4 in my
> original note). However, I couldn't get dllhelpers
> to resolve references from my DLL back to the main.
>
> I'm sure that whatever I'm doing wrong is obvious but
> I can't see it.
That's because Windows32 executable model, which includes DLLs and
what we usually call executables, is not the same as Unix!
On Windows32, executables and DLLs need to explicitly export symbols.
Also, DLLs need to be "self-contained", ie., no unresolved symbols
at link time, which means to be able to link in a symbol from the
"main executable", you'll need to address the link order issue.
GNU linker doesn't support --export-dynamic yet, but you can use a
DEF file and export symbols explicitly.
One way to achieve what you're trying to do is the following: export
the symbols from executable, and use LoadLibrary from the DLL to load
it dynamically from the exec.
I've never tried this, but at least in theory it should work fine.
Regards,
Mumit
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
- Raw text -