www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/08/27/02:25:30

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>,
<http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-Id: <199908270607.BAA19755@mercury.xraylith.wisc.edu>
To: Paul Sokolovsky <paul-ml AT is DOT lg DOT ua>
cc: Anders Norlander <anorland AT hem2 DOT passagen DOT se>,
James Stern <jsternitg AT yahoo DOT com>, cygwin AT sourceware DOT cygnus DOT com
Subject: Re: Re[4]: Importing a variable from a DLL
In-Reply-To: Your message of "Thu, 26 Aug 1999 18:02:13 +0300."
<13751 DOT 990826 AT is DOT lg DOT ua>
Date: Fri, 27 Aug 1999 01:07:57 -0500
From: Mumit Khan <khan AT xraylith DOT wisc DOT EDU>

Paul Sokolovsky <paul-ml AT is DOT lg DOT ua> writes:
> 
>     I am still feeling misunderstood. Let me go with it once again,
> with examples.
> 
>     So, dlltool has ability to create implib from def - it's all nice
> with it, it supports DATA, sure.

No, no, I do get your point. And, it's a very good one that I had 
ignored earlier in this thread.

I'm currently adding changes to GCC so that exported data items have
the correct "data" tag in the .drectve section. This will enable us 
to handle this in dlltool and dllwrap when the import libraries are 
created. I'll hopefully test the gcc and dlltool changes this weekend
(it's pretty trivial).

With this change, you can do the following:
  
  /* dll file. */
  __declspec(dllexport) int exported_var;
  __declspec(dllexport) void exported_fund () { }
  /* end dll file. */

  $ gcc -c dll.c
  $ dllwrap -o foo.dll --output-lib libfoo.a dll.o

Now the import library will have what Paul suggests.

Regards,
Mumit


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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