From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23171 invoked from network); 2 Jun 2000 16:18:13 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 2 Jun 2000 16:18:13 -0000 Received: (qmail 671 invoked by alias); 2 Jun 2000 16:17:57 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11732 Received: (qmail 662 invoked from network); 2 Jun 2000 16:17:48 -0000 Date: Fri, 02 Jun 2000 17:17:21 +0100 From: Peter Stephenson Subject: Re: Getting dynamic loading to work on cygwin In-reply-to: "Your message of Fri, 02 Jun 2000 08:16:15 PDT." To: zsh-workers@sunsite.auc.dk (Zsh hackers list) Message-id: <0FVJ00HL2BWX18@la-la.cambridgesiliconradio.com> Content-transfer-encoding: 7BIT Maurice Barnum wrote: > Data references can be imported on Win32, but you need help from the > compiler to generate an extra indirection on access to the imported data. > This of course implies that the compiler needs to know what data is > being imported, which with normal Win32 compilers is indicated by > decorating the extern declaration with '__import' or '__declspec(dllimport)'. > I don't have cygwin or it's documentation handy, so I don't know if > gcc supports this or some alternate spelling. Aha! extern int module_value __attribute__((__dllimport__)); This fixes things up. Thanks, that's exactly what we needed know --- this can (eventually) be automated by dumping the appropriate declarations to the prototype files. -- Peter Stephenson Cambridge Silicon Radio, Unit 300, Science Park, Milton Road, Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070