public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* help with dynamic linkage?
@ 2006-02-11  5:23 skaller
  2006-02-11  5:31 ` skaller
  2006-02-11  6:47 ` Igor Peshansky
  0 siblings, 2 replies; 10+ messages in thread
From: skaller @ 2006-02-11  5:23 UTC (permalink / raw)
  To: cygwin

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/

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2006-02-12  4:24 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-11  5:23 help with dynamic linkage? skaller
2006-02-11  5:31 ` skaller
2006-02-11  5:31   ` Brian Dessent
2006-02-11  5:59     ` skaller
2006-02-11  5:54   ` Igor Peshansky
2006-02-11  6:47 ` Igor Peshansky
2006-02-11  7:42   ` skaller
2006-02-11  8:22     ` skaller
2006-02-12  3:27     ` Igor Peshansky
2006-02-12  6:25       ` skaller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).