This works perfectly for creating a static library on the Win32 platform. I second the motion to get this included in the main distrobution ;)
Greetings, Jaco [EMAIL PROTECTED] wrote: > Funny, I need EXACTLY the same thing! > > 1. I created a XercesStaticLib project and copied contents from the > XercesLib into it, reset the default project options to match XercesLib (but > instruction set is blend *, Multithreaded DLL, no RTTI, no precomp headers). > > 2. Then I rebuilt all my libraries and found lots and lots of warnings about > importing AND exporting symbols in the same compilation, so I changed > VCPPDefs.hpp a little, the only change I made is to conditionally define the > exports - ala: > // > --------------------------------------------------------------------------- > // A define in the build for each project is also used to control whether > // the export keyword is from the project's viewpoint or the client's. > // These defines provide the platform specific keywords that they need > // to do this. > // > --------------------------------------------------------------------------- > #ifdef XML_SINGLEDLL > #define PLATFORM_EXPORT __declspec(dllexport) > #define PLATFORM_IMPORT __declspec(dllimport) > #else > // don't bother, assume that without the XML_SINGLEDLL we are building a > static library > // and therefore don't want to export symbols (esp. when VC++ complains > bitterly about > // havnig imports AND exports if you don't bother losing these > __declspec()'s) > #define PLATFORM_EXPORT > #define PLATFORM_IMPORT > #endif > > I noticed that the XML_SINGLEDLL #define isnt used anywhere else, so thought > 'heck, why not - lets use that instead of inventing my own!' > > 3. Recompiled everything again and ran my project test harnesses - things > appear to work OK, and I've thrown away my DLL version (shameless plug: ya > gotta love xtreme programming sometimes)! > > Attached is the project, feel free to use. > > LIST OWNERS / MODERATOR / SOMEONE: > Can we add this project and the VCPPDefs.hpp to the distro please (after > review no doubt)?? > > Regards > John Clayton. > > -----Original Message----- > From: Jaco Greeff [mailto:[EMAIL PROTECTED]] > Sent: 15 November 2001 05:52 > To: [EMAIL PROTECTED] > Subject: Xerces as static Win32 Library > > > Hi, > > I've done a bit of searching on the mail archives and couldn't come up > with a full answer on this one: it is possible to build Xerces as a > static library so we don't need to distribute the xerces dll along with > the program? If so, how? > > Our full application is componentised and allows for automatic software > updates. As one of the components, we provide a very light high-level > wrapper of the Xercer parser and would like this full DLL to actually > include a static version of Xerces to make our version control a bit better. > > Thanks for all replies, > Jaco > > > ------------------------------------------------------------------------ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- And there were all the stars, looking remarkably like powered diamonds spilled on black velvet, the stars that lured and ultimately called the boldest towards them... (Colour of Magic) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
