]> granicus.if.org Git - libexpat/commitdiff
* Applied patch #620822 - Windows Dll build with DEF file
authorKarl Waclawek <kwaclaw@users.sourceforge.net>
Mon, 21 Oct 2002 21:19:41 +0000 (21:19 +0000)
committerKarl Waclawek <kwaclaw@users.sourceforge.net>
Mon, 21 Oct 2002 21:19:41 +0000 (21:19 +0000)
* 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

expat/examples/elements.dsp
expat/lib/expat.dsp
expat/lib/expat.h
expat/lib/expat_static.dsp
expat/lib/expatw.dsp
expat/lib/expatw_static.dsp
expat/lib/libexpat.def [new file with mode: 0644]
expat/lib/libexpatw.def [new file with mode: 0644]
expat/lib/xmlparse.c
expat/win32/README.txt [new file with mode: 0644]

index e2eaa5783b2b202159e29b4d652039f41209f6bd..8caa2798dee730cc7a1f10cadc1db3069814f9cc 100644 (file)
@@ -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 
 
index c0d445ef802e0ea330fafaa264111b77a95a0a35..441c69b546aba42770de3a156a7e449bd4fdf4d0 100644 (file)
@@ -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"
index ccd52b0b8e81847dad9a5b385f966d04074d787c..958a92612b6fe8515449d5e44ab20d8b7a49b291 100644 (file)
@@ -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
index d2435765a2659d3732f4588f41a0f0392b07be32..62e5530c2212d840eb8f6c7acbc77be6e8e6f806 100644 (file)
@@ -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 
 
index 62ed94cefb291e387b369c13399b243e585db461..944edb56287b5f2604a30fb09959738bfb2e9a2c 100644 (file)
@@ -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"
index a1b912dcc4b866378df65e00c098c05df2ec8906..c36604802ea6610c22a9354996f9e2d334489e30 100644 (file)
@@ -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 
 
diff --git a/expat/lib/libexpat.def b/expat/lib/libexpat.def
new file mode 100644 (file)
index 0000000..5980507
--- /dev/null
@@ -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@
diff --git a/expat/lib/libexpatw.def b/expat/lib/libexpatw.def
new file mode 100644 (file)
index 0000000..5477a52
--- /dev/null
@@ -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@
index 0dcf61df3cd5dc3ebd0ccee5903241f642405a8f..fff5b4811a70e747d12f0200dd97941accec86fb 100644 (file)
@@ -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"
diff --git a/expat/win32/README.txt b/expat/win32/README.txt
new file mode 100644 (file)
index 0000000..63c49bd
--- /dev/null
@@ -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.
+   @