X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: <48BCAA99.1741FFB5@dessent.net> Date: Mon, 01 Sep 2008 19:53:13 -0700 From: Brian Dessent X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) MIME-Version: 1.0 To: "John E. / TDM" CC: cygwin AT cygwin DOT com, MinGW Users List Subject: Re: Import library for symbols decl. without dllimport References: <48BC9E64 DOT 3040701 AT tdragon DOT net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com "John E. / TDM" wrote: > This of course works fine, but it's sub-optimal; I would like for the > message not to be displayed at all, and I imagine that the auto-import > machinery shouldn't even need to be activated if the import library for > the libstdc++ DLL is properly designed. Also, hiding the message with > --enable-auto-import would also hide similar messages from other > libraries that I *would* want to see. That's just not how it works for data imports. For functions yes, but not for data imports. You either use auto-import or you __declspec(dllimport). It works for functions because the call can go through a thunk stub. But for data variables not marked __declspec(dllimport), there's no indirection; the only way to add the required indirection (to make the reference to a symbol in another module whose address isn't known until runtime) is to trick the operating system loader into modifying the text section at runtime which is what auto-import does. There's no way to simulate this with just an import library as is possible with function thunks. Brian -- 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/