delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/03/04/04:33:51

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Sender: tjh AT quadstone DOT com
Message-ID: <36DE5309.24E587FB@quadstone.com>
Date: Thu, 04 Mar 1999 09:31:53 +0000
From: T J Harding <tjh AT quadstone DOT com>
Organization: Quadstone
X-Mailer: Mozilla 4.5 [en] (X11; I; SunOS 5.6 sun4u)
X-Accept-Language: en
MIME-Version: 1.0
To: DJ Delorie <dj AT delorie DOT com>
CC: cygwin AT sourceware DOT cygnus DOT com
Subject: Re: How to handle variables (data, etc.) in DLLs?
References: <36DD41B4 DOT BF1C00D7 AT quadstone DOT com> <199903031619 DOT LAA28028 AT envy DOT delorie DOT com>

--------------C3D998DB2BB6DAA8A5993F54
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

DJ Delorie wrote:

> DLLs *can't* export "data".  They can only export pointers to data,
> which is what they do.  In older gccs, you'll need to do something
> like this:
> 
> extern int *__imp_foo;
> #define foo (*__imp_foo)
> 
> In newer gccs, do something like this:
> 
> extern int foo __attribute__((dllimport));
> 
> These tell gcc to dereference the imported pointer, rather than
> thinking it's the data itself.

Thanks, that's useful to know (although there are about 250 of these
data symbols in the code!).  I'd need to brush up on my C++ (yes, this
is actually C++ code) to figure out what's required.

Tim
--------------C3D998DB2BB6DAA8A5993F54
Content-Type: text/x-vcard; charset=us-ascii;
 name="tjh.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for T J Harding
Content-Disposition: attachment;
 filename="tjh.vcf"

begin:vcard 
n:Harding;Tim
tel;cell:+44 961 444986
tel;fax:+44 131 220 4492
tel;work:+44 131 220 4491
x-mozilla-html:TRUE
url:www.quadstone.com
org:Quadstone
adr:;;16 Chester Street;Edinburgh;Scotland;EH3 7RA;United Kingdom
version:2.1
email;internet:tjh AT quadstone DOT com
title:Decisionhouse Services
x-mozilla-cpt:;-1080
fn:Tim Harding
end:vcard


--------------C3D998DB2BB6DAA8A5993F54
Content-Type: text/plain; charset=

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

- Raw text -


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