Mailing-List: contact cygwin-apps-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-apps-owner AT sourceware DOT cygnus DOT com List-Subscribe: List-Archive: List-Post: List-Help: , Delivered-To: mailing list cygwin-apps AT sources DOT redhat DOT com Message-ID: <20010804204221.42595.qmail@web14501.mail.yahoo.com> Date: Sun, 5 Aug 2001 06:42:21 +1000 (EST) From: =?iso-8859-1?q?Danny=20Smith?= Subject: Re: auto-import STATUS To: Charles Wilson Cc: Paul Sokolovsky , Robert Collins , cygwin-apps AT cygwin DOT com In-Reply-To: <3B6C4156.7060404@ece.gatech.edu> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0-903623964-996957741=:38204" Content-Transfer-Encoding: 8bit --0-903623964-996957741=:38204 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Content-Disposition: inline --- Charles Wilson 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! --0-903623964-996957741=:38204 Content-Type: application/x-gzip-compressed; name="static_class++.tar.gz" Content-Transfer-Encoding: base64 Content-Description: static_class++.tar.gz Content-Disposition: attachment; filename="static_class++.tar.gz" H4sIAGNcbDsAA+1a61PbSBLnq+ev6MPZPZsg+SXgzoatCzah2IJAQXKXq9sr lyyP7dnIkmsk8aitvb99u0dvY2NyWciX6TK2NI/unp7u3/R0cWF/4RPh8q0X pGar2dy3rK0m0sG++m01raZ6R7Lws9U86HTalmU1O/s4vmO1rC1ovqRSKUVB aEuArbHteQ9PjHs3ngtPBKG0Q18Gr6HZq1CVVeEi8QGY+BL6D9M74Zmsyvp9 OIKp47D+58/45Lx9y9jg5PjTKb4YU6gal23qen/+7vQGm97UVGcdjMGnm5Ph 4Pyc9Zf7WP/qKm0zzkzG+D3n9yG+mfjEGGnzT1sKPwoAt2XKQ/z1YRQJd0wq IdPhh3cXJ6TOw9S5vx+7rol/quPk89Xw/OwY+1wxyvtMO+sdnLwv9/IJYx9P bj5eXV8qnaKAY/ubWqxWnTHbdbukfSK3js/Z+Hqsb+BH0uHBLvijX7kT4gMP HROw7+a6fwNq9Xeov2PLMeyYjkNfdXZ5/HPSScO62H5k+klzl5rpCZtVqxKE SoDkrh3yMdyikeyRywMTPs54wMGWXGkPdzPuxQYT3hTCGad5JtxwDjRVkhlp z9HvAdcvPA7Hn87OB2cfTmnP1s2/xCd5J1CSmC98GTb4Pf0EuE7A1bng+SHc +fILOL6UaAf3IRaK9nRcOwjMmXKvuY+KCm/im2pXMg8xBkUtjlrIFhdGGtqR GwL3QvkAC194qdZjGD0Q8ztpL3pKz3QsmkGCgzs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