www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/09/01/22:02:03

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <48BC9E64.3040701@tdragon.net>
Date: Mon, 01 Sep 2008 20:01:08 -0600
From: "John E. / TDM" <tdragon AT tdragon DOT net>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com, MinGW Users List <mingw-users AT lists DOT sourceforge DOT net>
Subject: Import library for symbols decl. without dllimport
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Greetings! I have a question for the DLL and ld gurus.

Is it possible to create an import library for ld on Win32 that will 
fulfill function and data symbols that were not declared with the 
dllimport attribute?

For example, the variable myvar is declared in unit.c as:
extern int myvar;

I would want to be able to fulfill myvar from either a static library or 
a DLL as desired, without having to recompile unit.c.

The above example is a very simple one. What I'm actually working on is 
the use of shared (DLL) versions of GCC's support libraries -- currently 
libstdc++. None of the libstdc++ declarations are marked 
__declspec(dllimport), and when it comes time to link with it I get 
messages like the following:
Info: resolving std::cout  by linking to __imp___ZSt4cout (auto-import)
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.

Thanks in advance,
John E.

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019