[Expat-discuss] Expat as a static library in Win32
Subramanian, Binu
binu.subramanian@barconet.com
Tue Jul 23 20:29:02 2002
Hello Fred,
Thank you for the prompt response.
I am sorry, i meant xmlparse.c
Yes, i have downloaded Expat 1.95.4 for Windows ( July 12,2002 release).
It still compiles to give a dll. How do i convert it to a static lib?
As i mentioned, i changed the project options from _USRDLL to _LIB and
replaced the
#define XMLPARSEAPI(type) __declspec(dllexport) type __cdecl in xmparse.c
with
#ifdef _USRDLL
#define XMLPARSEAPI(type) __declspec(dllexport) type __cdecl
#else
#define XMLPARSEAPI(type) type __cdecl
#endif
I still get the same error : warning LNK4003: invalid library format;
library ignored
Any ideas/ suggestions will be very useful.
Binu
-----Original Message-----
From: Fred L. Drake, Jr. [mailto:fdrake@acm.org]
Sent: 23 July 2002 17:19
To: Subramanian, Binu
Cc: expat-discuss@lists.sourceforge.net
Subject: Re: [Expat-discuss] Expat as a static library in Win32
Subramanian, Binu writes:
> I want to use expat as a static library. I tried some of the suggestions
> given on the mailing list...ie
> replacing the lines in xmlparse.cpp and compiling with the _LIB option
> instead of the _USRDLL option.
There is no xmlparse.cpp in the current version of Expat; it is
comprised entirely of C code, not C++. Have you tried a recent
version? Static libraries are now supported.
-Fred
--
Fred L. Drake, Jr. <fdrake at acm.org>
PythonLabs at Zope Corporation