Subject: Re: How to handle variables (data, etc.) in DLLs?
From: T J Harding <[email-masked]>
To: DJ Delorie <[email-masked]>
Cc: [email-masked]
Date: Thu, 04 Mar 1999 09:31:53 +0000

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

--
Want to unsubscribe from this list?
Send a message to [email-masked]