auto-import STATUS
Danny Smith
danny_r_smith_2001@yahoo.co.nz
Sat Aug 4 13:42:00 GMT 2001
--- Charles Wilson <cwilson@ece.gatech.edu> wrote: > Danny Smith
wrote:
>
> Okay, I only VAUGELY remember this, but....
>
> Forget for a moment the recent auto-import improvements. Think plain
>
> old-fashioned DLL support, requiring declspec(dll[ex|im]port)
> markings
> on data.
>
> Wasn't there some discussion many months ago about ld and C++ DLL's,
> something about needing to explicitly mark data fields within classes
> as
> declspec(), EVEN when the class ITSELF is marked declspec() ?
>
> Now, perhaps that got fixed. Perhaps it didn't. But, since an inner
>
> class is probably implemented as a field OF the enclosing class,
> maybe
> Danny's problem is related? (a) the old problem never got fixed, and
> is
> rearing its head here, or (b) the old problem got fixed -- but only
> partially and the fix needs to be extended to cover the "inner class"
>
> case. Or I'm just blowing smoke.
>
> Does anybody remember this?
>
> Now, returning to the new auto-import case:
>
> So, perhaps the logic that adds thunking symbols for DATA exports in
> DLLs needs to be re-examined, to make sure it covers these special
> cases, esp. "static" fields of classes, and inner classes, (and
> "static"
> fields OF inner classes...)
>
I don't think that's it, ether, but I'll work up some test cases to
see.
Here is a problem that doesn't work with old method and has been
reported to mingw list recently.
> class DLLIMPORT DllClass{
> public:
> DllClass (){}
> ~DllClass (){}
> static DllClass static_class;
> };
DllClass::static_class gets exported. Howvere, when building client
code, GCC complains about inconsistent dll linkage and as per usual
rule dllexport wins over dllimport for DllClass::static_class. All
that when using DLLIMPORT. I am currently testing a one line-change in
gcc/config/i386/winnt.c that fixes (but may break other things).
But, when using --enable-auto-import without DLLIMPORT, the recursion
works, just at it does with static libs.
Attached example.
Danny
_____________________________________________________________________________
http://messenger.yahoo.com.au - Yahoo! Messenger
- Voice chat, mail alerts, stock quotes and favourite news and lots more!
static_class++.tar.gz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: static_class++.tar.gz
Type: application/x-gzip
Size: 2270 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20010804/f0264baf/attachment.bin>
More information about the Cygwin-apps
mailing list