I'd like to revisit the issue of exporting symbols from DLLs on Windows. There are two ways to do this. One is to define some #define like this...
#if defined(WIN32) && !defined(STATIC_XM) /* On Windows, we need to indicate that variables are actually exported from a DLL */ #if XMDLL /* We're compiling the DLL */ #define XMLIBEXPORT __declspec(dllexport) #else /* We're including this in an application that will link to the DLL */ #define XMLIBEXPORT __declspec(dllimport) #endif #else #define XMLIBEXPORT #endif And then add XMLIBEXPORT in front of every symbol to be exported. Tedious, but I've already done it on the sources I'm building from and could provide diffs for 139 include files (now that I have the tools to create proper .diff files and not just a pretty HTML report) The other way is to use the .def file approach to tell the linker what to export. As was pointed out, this is being done for OS/2. The .def file format is slightly different for the Windows linker, but something could be written to convert the files. The difficulty with this being that on Windows you don't have Perl and all the stuff you'd expect. Plus you still have to specify the XMLIBEXPORT on structures because this access has to be known at compile time. So for ease of maintained in the future, it seems like putting XMLIBEXPORT in front of everything would be the easier way to go. What are your thoughts and feelings on this? -- Dave Williss ------ Meddle not in the affairs of dragons, for you are crunchy and taste good with catsup _______________________________________________ Lesstif mailing list [EMAIL PROTECTED] https://terror.hungry.com/mailman/listinfo/lesstif
