delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/04/19/11:43:15

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
Message-ID: <371B5AED.DD92D37F@hem2.passagen.se>
Date: Mon, 19 Apr 1999 18:33:49 +0200
From: Anders Norlander <anorland AT hem2 DOT passagen DOT se>
X-Mailer: Mozilla 4.01 [en] (Win95; I)
MIME-Version: 1.0
To: Glauco Masotti <vaf9143 AT madrona-a DOT iperbole DOT bologna DOT it>
CC: cygwin AT sourceware DOT cygnus DOT com
Subject: Re: part 2: mixing GNU and MS tools/libraries...
X-Priority: 3 (Normal)
References: <3 DOT 0 DOT 1 DOT 32 DOT 19990419095807 DOT 00686068 AT pop DOT iperbole DOT bologna DOT it>

Glauco Masotti wrote:
> 
> Hello. I would like to thank Anders Norlander who gave me the necessary
> hints to unblock the situation. Thanks also to Fergus Henderson, Earnie Boyd
> and Mikey for their contribution.
> 
> Although I made some progress, however I couldn't solve the problem
> completely jet.
> Well, me10f.lib is a dll import library, so I used the sequence suggested
> by Anders
> to build me10.def and libme10f.a, so I am supposed now to be able to use ld
> -r
> to link my stuff with ME10 goodies.
> Unfortunately I also have to access *global data* that resides in me10.exe
> image.
> These data are defined in the code as DllImport variables and correspond to
> symbols
> prefixed by __imp_ for the loader.
> The problem is that I get all these symbols unresolved now!
> What else should I do to move off shoals?

A data symbol imported from an external dll/executable is actually a
pointer to the external data, therefore you need to tell the compiler
how to access the data. You do so by using the __declspec(dllimport)
directive in extern declarations.

As data symbols are treated the same as any other symbol by the win32
loader you need to include them in your .def file as well when building
the import library.

Regards,
Anders

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