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
-- 
'What is this thing, anyway?' said the Dean, inspecting the implement in 
his hands.
'It's called a shovel', said the Senior Wrangler. 'I've seen the 
gardeners use them. You stick the sharp end in the ground. Then it gets 
a bit technical.'
(Reaper Man)


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



------------------------------------------------------------------------
For more information about Barclays Capital, please
visit our web site at http://www.barcap.com.


Internet communications are not secure and therefore the Barclays 
Group does not accept legal responsibility for the contents of this 
message.  Although the Barclays Group operates anti-virus programmes, 
it does not accept responsibility for any damage whatsoever that is 
caused by viruses being passed.  Any views or opinions presented are 
solely those of the author and do not necessarily represent those of the 
Barclays Group.  Replies to this email may be monitored by the Barclays 
Group for operational or business reasons.

------------------------------------------------------------------------

Attachment: XercesStaticLib.dsp
Description: Binary data

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to