mirror of
https://github.com/libexpat/libexpat.git
synced 2025-04-15 09:44:36 +00:00
* Applied patch #620822 - Windows Dll build with DEF file
* Changed macro for static linking from _STATIC to XML_STATIC and modified expat.h accordingly * Added ReadMe file to Win32 subdirectory documenting Windows builds * Changed static build settings to create libraries with names different from the Dll stub library libexpat(w).lib
This commit is contained in:
parent
0bf90d3f52
commit
c61a46c305
10 changed files with 186 additions and 16 deletions
|
@ -42,7 +42,7 @@ RSC=rc.exe
|
|||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\lib" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_STATIC" /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\lib" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "XML_STATIC" /FD /c
|
||||
# SUBTRACT CPP /X /YX
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
|
@ -51,7 +51,7 @@ BSC32=bscmake.exe
|
|||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 odbccp32.lib libexpat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib /nologo /subsystem:console /pdb:none /machine:I386 /libpath:"..\lib\Release_static"
|
||||
# ADD LINK32 odbccp32.lib libexpatMT.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib /nologo /subsystem:console /pdb:none /machine:I386 /libpath:"..\lib\Release_static"
|
||||
|
||||
!ELSEIF "$(CFG)" == "elements - Win32 Debug"
|
||||
|
||||
|
@ -67,7 +67,7 @@ LINK32=link.exe
|
|||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /Gm- /GX /ZI /Od /I "..\lib" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_STATIC" /FR /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /I "..\lib" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "XML_STATIC" /FR /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
|
@ -75,7 +75,7 @@ BSC32=bscmake.exe
|
|||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 odbccp32.lib libexpat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /libpath:"..\lib\Debug_static"
|
||||
# ADD LINK32 odbccp32.lib libexpatMT.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /libpath:"..\lib\Debug_static"
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
|
|
@ -92,6 +92,10 @@ LINK32=link.exe
|
|||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\libexpat.def
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\xmlparse.c
|
||||
|
||||
!IF "$(CFG)" == "expat - Win32 Release"
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#ifndef XMLPARSEAPI
|
||||
#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)
|
||||
#ifdef _STATIC
|
||||
#ifdef XML_STATIC
|
||||
#define XMLPARSEAPI(type) type __cdecl
|
||||
#else
|
||||
#define XMLPARSEAPI(type) __declspec(dllimport) type __cdecl
|
||||
|
|
|
@ -50,7 +50,7 @@ BSC32=bscmake.exe
|
|||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"Release_static\libexpat.lib"
|
||||
# ADD LIB32 /nologo /out:"Release_static\libexpatMT.lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "expat_static - Win32 Debug"
|
||||
|
||||
|
@ -74,7 +74,7 @@ BSC32=bscmake.exe
|
|||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"Debug_static\libexpat.lib"
|
||||
# ADD LIB32 /nologo /out:"Debug_static\libexpatMT.lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
|
|
@ -93,6 +93,10 @@ LINK32=link.exe
|
|||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\libexpatw.def
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\xmlparse.c
|
||||
|
||||
!IF "$(CFG)" == "expatw - Win32 Release"
|
||||
|
|
|
@ -50,7 +50,7 @@ BSC32=bscmake.exe
|
|||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"Release-w_static\libexpatw.lib"
|
||||
# ADD LIB32 /nologo /out:"Release-w_static\libexpatwMT.lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "expatw_static - Win32 Debug"
|
||||
|
||||
|
@ -64,8 +64,8 @@ LIB32=link.exe -lib
|
|||
# PROP Output_Dir "Debug-w_static"
|
||||
# PROP Intermediate_Dir "Debug-w_static"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /Gm- /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "COMPILED_FROM_DSP" /D "_MBCS" /D "_LIB" /FR /FD /GZ /c
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "COMPILED_FROM_DSP" /D "_MBCS" /D "_LIB" /FR /FD /GZ /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x1009 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
|
@ -74,7 +74,7 @@ BSC32=bscmake.exe
|
|||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"Debug-w_static\libexpat.lib"
|
||||
# ADD LIB32 /nologo /out:"Debug-w_static\libexpatwMT.lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
|
61
expat/lib/libexpat.def
Normal file
61
expat/lib/libexpat.def
Normal file
|
@ -0,0 +1,61 @@
|
|||
LIBRARY LIBEXPAT
|
||||
DESCRIPTION "Implements an XML parser."
|
||||
EXPORTS
|
||||
XML_DefaultCurrent @1
|
||||
XML_ErrorString @2
|
||||
XML_ExpatVersion @3
|
||||
XML_ExpatVersionInfo @4
|
||||
XML_ExternalEntityParserCreate @5
|
||||
XML_GetBase @6
|
||||
XML_GetBuffer @7
|
||||
XML_GetCurrentByteCount @8
|
||||
XML_GetCurrentByteIndex @9
|
||||
XML_GetCurrentColumnNumber @10
|
||||
XML_GetCurrentLineNumber @11
|
||||
XML_GetErrorCode @12
|
||||
XML_GetIdAttributeIndex @13
|
||||
XML_GetInputContext @14
|
||||
XML_GetSpecifiedAttributeCount @15
|
||||
XML_Parse @16
|
||||
XML_ParseBuffer @17
|
||||
XML_ParserCreate @18
|
||||
XML_ParserCreateNS @19
|
||||
XML_ParserCreate_MM @20
|
||||
XML_ParserFree @21
|
||||
XML_SetAttlistDeclHandler @22
|
||||
XML_SetBase @23
|
||||
XML_SetCdataSectionHandler @24
|
||||
XML_SetCharacterDataHandler @25
|
||||
XML_SetCommentHandler @26
|
||||
XML_SetDefaultHandler @27
|
||||
XML_SetDefaultHandlerExpand @28
|
||||
XML_SetDoctypeDeclHandler @29
|
||||
XML_SetElementDeclHandler @30
|
||||
XML_SetElementHandler @31
|
||||
XML_SetEncoding @32
|
||||
XML_SetEndCdataSectionHandler @33
|
||||
XML_SetEndDoctypeDeclHandler @34
|
||||
XML_SetEndElementHandler @35
|
||||
XML_SetEndNamespaceDeclHandler @36
|
||||
XML_SetEntityDeclHandler @37
|
||||
XML_SetExternalEntityRefHandler @38
|
||||
XML_SetExternalEntityRefHandlerArg @39
|
||||
XML_SetNamespaceDeclHandler @40
|
||||
XML_SetNotStandaloneHandler @41
|
||||
XML_SetNotationDeclHandler @42
|
||||
XML_SetParamEntityParsing @43
|
||||
XML_SetProcessingInstructionHandler @44
|
||||
XML_SetReturnNSTriplet @45
|
||||
XML_SetStartCdataSectionHandler @46
|
||||
XML_SetStartDoctypeDeclHandler @47
|
||||
XML_SetStartElementHandler @48
|
||||
XML_SetStartNamespaceDeclHandler @49
|
||||
XML_SetUnknownEncodingHandler @50
|
||||
XML_SetUnparsedEntityDeclHandler @51
|
||||
XML_SetUserData @52
|
||||
XML_SetXmlDeclHandler @53
|
||||
XML_UseParserAsHandlerArg @54
|
||||
XML_ParserReset @55
|
||||
XML_SetSkippedEntityHandler @56
|
||||
XML_GetFeatureList @57
|
||||
XML_UseForeignDTD @58@
|
61
expat/lib/libexpatw.def
Normal file
61
expat/lib/libexpatw.def
Normal file
|
@ -0,0 +1,61 @@
|
|||
LIBRARY LIBEXPATW
|
||||
DESCRIPTION "Implements an XML parser."
|
||||
EXPORTS
|
||||
XML_DefaultCurrent @1
|
||||
XML_ErrorString @2
|
||||
XML_ExpatVersion @3
|
||||
XML_ExpatVersionInfo @4
|
||||
XML_ExternalEntityParserCreate @5
|
||||
XML_GetBase @6
|
||||
XML_GetBuffer @7
|
||||
XML_GetCurrentByteCount @8
|
||||
XML_GetCurrentByteIndex @9
|
||||
XML_GetCurrentColumnNumber @10
|
||||
XML_GetCurrentLineNumber @11
|
||||
XML_GetErrorCode @12
|
||||
XML_GetIdAttributeIndex @13
|
||||
XML_GetInputContext @14
|
||||
XML_GetSpecifiedAttributeCount @15
|
||||
XML_Parse @16
|
||||
XML_ParseBuffer @17
|
||||
XML_ParserCreate @18
|
||||
XML_ParserCreateNS @19
|
||||
XML_ParserCreate_MM @20
|
||||
XML_ParserFree @21
|
||||
XML_SetAttlistDeclHandler @22
|
||||
XML_SetBase @23
|
||||
XML_SetCdataSectionHandler @24
|
||||
XML_SetCharacterDataHandler @25
|
||||
XML_SetCommentHandler @26
|
||||
XML_SetDefaultHandler @27
|
||||
XML_SetDefaultHandlerExpand @28
|
||||
XML_SetDoctypeDeclHandler @29
|
||||
XML_SetElementDeclHandler @30
|
||||
XML_SetElementHandler @31
|
||||
XML_SetEncoding @32
|
||||
XML_SetEndCdataSectionHandler @33
|
||||
XML_SetEndDoctypeDeclHandler @34
|
||||
XML_SetEndElementHandler @35
|
||||
XML_SetEndNamespaceDeclHandler @36
|
||||
XML_SetEntityDeclHandler @37
|
||||
XML_SetExternalEntityRefHandler @38
|
||||
XML_SetExternalEntityRefHandlerArg @39
|
||||
XML_SetNamespaceDeclHandler @40
|
||||
XML_SetNotStandaloneHandler @41
|
||||
XML_SetNotationDeclHandler @42
|
||||
XML_SetParamEntityParsing @43
|
||||
XML_SetProcessingInstructionHandler @44
|
||||
XML_SetReturnNSTriplet @45
|
||||
XML_SetStartCdataSectionHandler @46
|
||||
XML_SetStartDoctypeDeclHandler @47
|
||||
XML_SetStartElementHandler @48
|
||||
XML_SetStartNamespaceDeclHandler @49
|
||||
XML_SetUnknownEncodingHandler @50
|
||||
XML_SetUnparsedEntityDeclHandler @51
|
||||
XML_SetUserData @52
|
||||
XML_SetXmlDeclHandler @53
|
||||
XML_UseParserAsHandlerArg @54
|
||||
XML_ParserReset @55
|
||||
XML_SetSkippedEntityHandler @56
|
||||
XML_GetFeatureList @57
|
||||
XML_UseForeignDTD @58@
|
|
@ -8,11 +8,7 @@
|
|||
#ifdef COMPILED_FROM_DSP
|
||||
|
||||
#include "winconfig.h"
|
||||
#ifdef _LIB
|
||||
#define XMLPARSEAPI(type) type __cdecl
|
||||
#else
|
||||
#define XMLPARSEAPI(type) __declspec(dllexport) type __cdecl
|
||||
#endif
|
||||
#include "expat.h"
|
||||
#undef XMLPARSEAPI
|
||||
|
||||
|
@ -26,7 +22,7 @@
|
|||
#include <expat_config.h>
|
||||
|
||||
#ifdef __declspec
|
||||
#define XMLPARSEAPI(type) __declspec(dllexport) type __cdecl
|
||||
#define XMLPARSEAPI(type) type __cdecl
|
||||
#endif
|
||||
|
||||
#include "expat.h"
|
||||
|
|
44
expat/win32/README.txt
Normal file
44
expat/win32/README.txt
Normal file
|
@ -0,0 +1,44 @@
|
|||
|
||||
Expat can be built on Windows in three ways:
|
||||
using MS Visual C++ 6, Borland C++ Builder 5 or Cygwin.
|
||||
|
||||
* Cygwin:
|
||||
This follows the Unix build procedures.
|
||||
|
||||
* C++ Builder 5:
|
||||
Possible with make files in the BCB5 subdirectory.
|
||||
Details can be found in the ReadMe file located there.
|
||||
|
||||
* MS Visual C++ 6:
|
||||
Based on workspace (.dsw) and project files (.dsp)
|
||||
located in the lib subdirectory.
|
||||
|
||||
* Special note about building static libraries under MS VC++:
|
||||
|
||||
There are three possible configurations: using the
|
||||
single threaded or multithreaded run-time library,
|
||||
or using the multi-threaded run-time Dll. That is,
|
||||
one can build three different Expat libraries depending
|
||||
on the needs of the application.
|
||||
|
||||
The libraries should be named like this:
|
||||
Single-theaded: libexpatML.lib
|
||||
Multi-threaded: libexpatMT.lib
|
||||
Multi-threaded Dll: libexpatMD.lib
|
||||
The suffixes conform to the compiler switch settings
|
||||
/ML, /MT and /MD for MS VC++.
|
||||
|
||||
By default, the expat-static and expatw-static projects
|
||||
are set up to link against the multithreaded run-time library,
|
||||
so they will build libexpatMT.lib or libexpatwMT.lib files.
|
||||
|
||||
To build the other versions of the static library,
|
||||
go to Project - Settings:
|
||||
- specify a different RTL linkage on the C/C++ tab
|
||||
under the category Code Generation.
|
||||
- then, on the Library tab, change the output file name
|
||||
accordingly, as described above
|
||||
|
||||
An application linking to the static libraries must
|
||||
have the global macro XML_STATIC defined.
|
||||
@
|
Loading…
Add table
Reference in a new issue