You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Th...@homag.de on 2001/12/14 11:15:33 UTC
Antwort: RE: Xerces as static Win32 library - once again [WatchDog checked]
Hi Peter,
I need Xerces as a static library, too. I did it almost the same way John
Clayton described.
There's one point that isn't mentioned yet: with MS Visual Studio you can
create different versions of a project:
s => Static library (.lib), else dynamic link library
(.dll)
i => sInglethreaded else multithreaded
u => Unicode else ansi
t => sTatic linked runtime else dll linked runtime
Xerces does not distinguish between ansi and unicode, so there remain 6
possible versions (creating a static lib) for it:
- static multi debug DllRTL => xerces_sd.lib
- static multi release DllRTL => xerces_s.lib
- static single debug StaticRTL => xerces_sidt.lib
- static single release StaticRTL => xerces_sid.lib
- static multi debug StaticRTL => xerces_sdt.lib
- static multi release StaticRTL => xerces_st.lib
We use these naming conventions at our company.
In a MS VS Project there are up to 24 versions of a library possible. The 6
above and additionally
- ansi and unicode
- static library and dynamic link library
It would be fine if all of these 6 versions above will be inside Xerces.
Here's my static .dsp and VCPPDefs.hpp file for Xerces 1.6.0 (instead of
the define XML_SINGLEDLL XML_HAS_LIB is defined):
(See attached file: xerces_static.zip)
Regards,
Thomas Rothfuß
thomas.rothfuss@homag.de
Peter Michael
Bertelsen An: "'xerces-c-dev@xml.apache.org'" <xe...@xml.apache.org>
<PMB@maconomy. Kopie:
dk> Thema: RE: Xerces as static Win32 library - once again
12.12.01 14:08
Bitte
antworten an
xerces-c-dev
Due to the lack of any responses, I've found what appears to be a
workaround myself: do not "disable language extensions" in the Visual
Studio project for building Xerces as a static library. At least this makes
the aforementioned compile errors go away.
Anybody has a clue why the XercesLib that comes with the Xerces
distribution has no problems, although it is set to "disable language
extensions"?
I still wonder why the fix that John Clayton provided is not part of 1.6.0.
It would be quite convenient if something like this was checked into
Xerces' source base, such that I wouldn't have to start from scratch every
time I download a new version. Moreover, a number of Xerces users seems to
have the same need for building Xerces as a static (Win32) library. So,
what's holding it back?
Regards,
Peter Bertelsen
Maconomy R&D
http://www.maconomy.com
-----Original Message-----
From: Peter Michael Bertelsen [mailto:PMB@maconomy.dk]
Sent: 11. december 2001 19:52
To: Xerces-C Mailing List (E-mail)
Subject: Xerces as static Win32 library - once again
Hi,
I've been trying to follow the guidelines that John Clayton gave earlier
on this topic.
(See http://marc.theaimsgroup.com/?l=xerces-c-dev&m=100590213927031&w=2
for details.)
However, when compiling my XercesStaticLib, I keep getting errors in
winnt.h like these:
...\VC98\INCLUDE\winnt.h(357) : error C2467: illegal declaration of
anonymous 'struct'
...\VC98\INCLUDE\winnt.h(376) : error C2467: illegal declaration of
anonymous 'struct'
...\VC98\INCLUDE\winnt.h(1519) : error C2146: syntax error : missing ';'
before identifier 'PVOID'
...\VC98\INCLUDE\winnt.h(1519) : error C2501: '_inline' : missing
storage-class or type specifiers
...\VC98\INCLUDE\winnt.h(1519) : fatal error C1004: unexpected end of
file found
Has anybody else experienced something similar? If so, what was the cure?
BTW, what was the reason for not including John's fix in 1.6.0?
TIA,
Peter Bertelsen
Maconomy R&D
http://www.maconomy.com