Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Getting dynamic loading to work on cygwin



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 <pws@xxxxxxxxxxxxxxxxxxxxxxxxx>
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070



Messages sorted by: Reverse Date, Date, Thread, Author