delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/10/21/10:04:23

From: ron AT mossbayeng DOT com (Ron Aaron)
Subject: exporting structs from DLL using mingw32/egcs 1.1 -- doesn't work
21 Oct 1998 10:04:23 -0700 :
Message-ID: <001c01bdfcb0$303f7270$0600000a.cygnus.gnu-win32@mbe>
References: <19981020102053 DOT E6189 AT dgii DOT com>
Mime-Version: 1.0
To: <egcs AT cygnus DOT com>, <gnu-win32 AT cygnus DOT com>

I am trying to export data from a DLL, where the variable in question is a
struct.

So I have in my DLL:
	__declspec(dllexport) struct joebob myvar;

and in the file which uses is:
	__declspec(dllimport) struct joebob myvar;

But the mingw32/egcs 1.1 compiler complains that there is a declaration
conflict between the two.

Now, if I change this to 'struct joebob * myvar' in both places, it works
just fine.

My problem is that this is someone else's code, and it compiles and runs
fine with the Borland C compiler, and changing the dozen or so instances of
this sort of thing would involve a *lot* of #ifdef's in the code, which I
studiously wish to avoid.

Is this an issue which will be repaired?  That is, will I be able to export
data larger than int's at some point (or how can I do it now)?

Regards,
Ron

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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