You are viewing a plain text version of this content. The canonical link for it is here.
Posted to p-dev@xerces.apache.org by Martin Raspe <ra...@uni-trier.de> on 2002/12/21 22:11:25 UTC
XML::Xerces 2.0.0-3 under Windows
Hello,
I tried to compile XML::Xerces 2.0.0-3 under Windows (2000 SP3; MS
VC6.0; Perl 5.6.1 - Activestate Build 629), using "dmake". Unfortunately
I did not completely succeed because of linker problems. Maybe someone
can comment on what I did wrong or even guide me in the right direction?
Here is what I did:
1. Made several changes to "Makefile.PL" and "Manifest" (see diffs
below). I had to rename Xerces.C to Xerces.c, otherwise dmake would not
process it.
2. Then everything compiled OK (see command line below).
3. Linking produced 7 errors. 6 of them have to do with the overloaded
SAX exceptions, one concerns XMLScanner_getGrammar. Down below I have
listed the offending lines in Xerces.c - they look right to me. After
commenting out these lines (or changing "new SAXNotSupportedException()"
and "new SAXNotRecognizedException()" into "new SAXException()") the
DLL is created, but produces errors in several of the tests (mostly in
connection with SAX exceptions as one would suppose).
Where did I make a mistake? Did I miss a linker option? Or could the
.lib file for Windows be wrong or incomplete (I took "xerces-c_2.lib"
from the "xerces-c2_0_0-win32" distribution)? Should I build my own
Xerces-c DLL?
4. By the way, " 2>/dev/null" (which appears in some of the tests) also
produces errors under Windows.
Merry Christmas and thanks for any hints,
Martin
diff orig/Makefile.PL Makefile.PL
# ---------------------------------
131c131
< my $LIBXERCES = "-lxerces-c";
---
> my $LIBXERCES = "-lxerces-c_2"; # actual name of the .lib
165c165
< \$(MAKE) -C Handler static
---
> cd Handler && \${MAKE} static
173c173
< my $CFLAGS = '-D_REENTRANT';
---
> my $CFLAGS = '-D_REENTRANT -DWIN32 -TP -GX -DHAS_BOOL'; # from config.pm
190,192c190,192
< Xerces.C: Xerces.i typemaps.i @header_files postSource.pl
< \$(SWIG) -DVERSION="$XERCES_PERL_VERSION" \$(INC) -perl5 -c++ -shadow
-o Xerces.C Xerces.i
< perl postSource.pl Xerces.C
---
> xerces.c: Xerces.i typemaps.i @header_files postSource.pl
> \$(SWIG) -DVERSION="$XERCES_PERL_VERSION" \$(INC) -perl5 -c++
-shadow -o xerces.c Xerces.i
> perl postSource.pl xerces.c
196c196
< Xerces.pm: Xerces.C postModule.pl Xerces-extra.pm
---
> Xerces.pm: xerces.c postModule.pl Xerces-extra.pm
205c205
< \$(MAKE) -C Handler static
---
> cd Handler && \${MAKE} static
diff orig/Manifest Manifest
# ---------------------------------
28c28
< Xerces.C
---
> Xerces.c
Compiler command line
# ---------------------------------
cl -c -I. -IHandler -IC:\xerces-c2_0_0-win32\include -D_REENTRANT
-DWIN32 -TP
-GX -DHAS_BOOL -O1 -MD -DNDEBUG -DVERSION=\"2.0.0-3\"
-DXS_VERSION=\"2.0.0-3\" "-IC:\perl629\lib\CORE" Xerces.c
Linker command line
# ---------------------------------
link -out:blib\arch\auto\XML\Xerces\Xerces.dll -dll -nologo
-nodefaultlib -release
-libpath:"C:\p4view\Apps\ActivePerl\MSI\data\ActivePerl\Perl\lib\CORE"
-machine:x86 Xerces.obj blib\arch/auto/Handler/Handler.lib
C:\perl629\lib\CORE\perl56.lib
C:\xerces-c2_0_0-win32\lib\xerces-c_2.lib
C:\PROGRA~1\MICROS~2\VC98\LIB\oldnames.lib
C:\PROGRA~1\MICROS~2\VC98\LIB\kernel32.lib
C:\PROGRA~1\MICROS~2\VC98\LIB\user32.lib
C:\PROGRA~1\MICROS~2\VC98\LIB\gdi32.lib
C:\PROGRA~1\MICROS~2\VC98\LIB\winspool.lib
C:\PROGRA~1\MICROS~2\VC98\LIB\comdlg32.lib
C:\PROGRA~1\MICROS~2\VC98\LIB\advapi32.lib
C:\PROGRA~1\MICROS~2\VC98\LIB\shell32.lib
C:\PROGRA~1\MICROS~2\VC98\LIB\ole32.lib
C:\PROGRA~1\MICROS~2\VC98\LIB\oleaut32.lib
C:\PROGRA~1\MICROS~2\VC98\LIB\netapi32.lib
C:\PROGRA~1\MICROS~2\VC98\LIB\uuid.lib
C:\PROGRA~1\MICROS~2\VC98\LIB\wsock32.lib
C:\PROGRA~1\MICROS~2\VC98\LIB\mpr.lib
C:\PROGRA~1\MICROS~2\VC98\LIB\winmm.lib
C:\PROGRA~1\MICROS~2\VC98\LIB\version.lib
C:\PROGRA~1\MICROS~2\VC98\LIB\odbc32.lib
C:\PROGRA~1\MICROS~2\VC98\LIB\odbccp32.lib C:
\PROGRA~1\MICROS~2\VC98\LIB\msvcrt.lib
-def:Xerces.def
Link errors
# ---------------------------------
Xerces.obj : error LNK2001:
unresolved external symbol
"public: __thiscall
SAXNotSupportedException::SAXNotSupportedException(void)"
(??0SAXNotSupportedException@@QAE@XZ)
Xerces.obj : error LNK2001:
unresolved external symbol
"public: __thiscall SAXNotSupportedException::SAXNotSupportedException
(unsigned short const * const)"
(??0SAXNotSupportedException@@QAE@QBG@Z)
Xerces.obj : error LNK2001:
unresolved external symbol
"public: __thiscall
SAXNotSupportedException::SAXNotSupportedException(class SAXException
const &)"
(??0SAXNotSupportedException@@QAE@ABVSAXException@@@Z)
Xerces.obj : error LNK2001:
unresolved external symbol
"public: __thiscall
SAXNotRecognizedException::SAXNotRecognizedException(void)"
(??0SAXNotRecognizedException@@QAE@XZ)
Xerces.obj : error LNK2001:
unresolved external symbol
"public: __thiscall
SAXNotRecognizedException::SAXNotRecognizedException(unsigned short
const * const)"
(??0SAXNotRecognizedException@@QAE@QBG@Z)
Xerces.obj : error LNK2001:
unresolved external symbol
"public: __thiscall
SAXNotRecognizedException::SAXNotRecognizedException(class SAXException
const&)"
(??0SAXNotRecognizedException@@QAE@ABVSAXException@@@Z)
Xerces.obj : error LNK2001:
unresolved external symbol
"public: class Grammar * __thiscall GrammarResolver::getGrammar(unsigned
short const * const)"
(?getGrammar@GrammarResolver@@QAEPAVGrammar@@QBG@Z)
dmake.exe: Error code 96, while making
'blib\arch\auto\XML\Xerces\Xerces.dll'
#------------------------------------------------
The following lines in Xerces.c cause these errors:
8256: result = (SAXNotSupportedException *)new SAXNotSupportedException();
8300: result = (SAXNotSupportedException *)new
SAXNotSupportedException((XMLCh const *)arg1);
8347: result = (SAXNotSupportedException *)new
SAXNotSupportedException((SAXException const &)*arg1);
8416: result = (SAXNotRecognizedException *)new SAXNotRecognizedException();
8460: result = (SAXNotRecognizedException *)new
SAXNotRecognizedException((XMLCh const *)arg1);
8507: result = (SAXNotRecognizedException *)new
SAXNotRecognizedException((SAXException const &)*arg1);
18776: result = (Grammar *)(arg1)->getGrammar((XMLCh const *)arg2);
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org