This is the mail archive of the
cygwin
mailing list for the Cygwin project.
help with dynamic linkage?
- From: skaller <skaller at users dot sourceforge dot net>
- To: cygwin at cygwin dot com
- Date: Sat, 11 Feb 2006 16:11:50 +1100
- Subject: help with dynamic linkage?
hi, I'm having some problem getting dynamic linkage to work.
The linkage model is like this:
mainline <----- load time ---- librtl.dll
^ /
\ /
dlopen /
\ /
user.dll <-----------------
gdb indicates the code is crashing in dlopen. LoadLibrary
doesn't appear to work either :)
All the code is C++. It works on Linux, it works with
the option -mnocygwin, and it works with MSVC++.
It *used* to work with Cygwin. The problem is almost
certainly just using the wrong linker switches.
The linkage technique is to follow Linux: no export libraries
are built, build time linkage is done directly against the
dll. This works fine for a simple C program.
In order to build according to the above model,
there are 3 compilation steps, and 3 linkage steps.
However, the crash is unrelated to building the user.dll,
since it occurs whenever mainline calls dlopen, even with
a garbage name.
I have cygwin installed on 2 comps and get the same result.
I have tried two methods: generate and link against export file
librtl.dll.a, and just linkagainst librtl.dll. Both methods
fail. Warnings like:
Info: resolving vtable for XXXby linking to __imp__XXX (auto-import)
occur when linking the executable.
Switches: -O3 -fomit-frame-pointer --inline
Hosts:
* AMD64 running XP pro SP1
* AMD64x2 running XP64
Cygwin: latest setup provides.
Any hints what is causing the problem or how to fix it?
--
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/