我尝试过几次,它可能很容易解决,但我看不到解决方案。 我尝试从xerces站点编译SAXPrint示例(链接到四个* .cpp和* .hpp文件是here [抱歉使用skydrive,我的FTP死了])在linux中使用g ++(得到了xerces-dev包)和Windows(MinGW与图书馆),我不能成功你有没有机会借给我一个手?我试过命令:
g++ SAXPrint.hpp SAXPrint.cpp SAXPrintHandlers.hpp SAXPrintHandlers.cpp -o output
它给了我:
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x0): multiple definition of `SAXPrintHandlers::SAXPrint
Handlers(char const*, xercesc_3_1::XMLFormatter::UnRepFlags)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x0): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x0): multiple definition of `SAXPrintHandlers::SAXPrint
Handlers(char const*, xercesc_3_1::XMLFormatter::UnRepFlags)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x0): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x11e): multiple definition of `SAXPrintHandlers::~SAXPr
intHandlers()'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x11e): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x11e): multiple definition of `SAXPrintHandlers::~SAXPr
intHandlers()'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x11e): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x1c9): multiple definition of `non-virtual thunk to SAX
PrintHandlers::~SAXPrintHandlers()'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x1c9): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x1d3): multiple definition of `non-virtual thunk to SAX
PrintHandlers::~SAXPrintHandlers()'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x1d3): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x1dd): multiple definition of `non-virtual thunk to SAX
PrintHandlers::~SAXPrintHandlers()'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x1dd): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x1e7): multiple definition of `non-virtual thunk to SAX
PrintHandlers::~SAXPrintHandlers()'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x1e7): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x1f2): multiple definition of `SAXPrintHandlers::~SAXPr
intHandlers()'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x1f2): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x212): multiple definition of `non-virtual thunk to SAX
PrintHandlers::~SAXPrintHandlers()'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x212): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x219): multiple definition of `non-virtual thunk to SAX
PrintHandlers::~SAXPrintHandlers()'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x219): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x220): multiple definition of `non-virtual thunk to SAX
PrintHandlers::~SAXPrintHandlers()'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x220): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x227): multiple definition of `non-virtual thunk to SAX
PrintHandlers::~SAXPrintHandlers()'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x227): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x22e): multiple definition of `SAXPrintHandlers::writeC
hars(unsigned char const*)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x22e): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x234): multiple definition of `SAXPrintHandlers::writeC
hars(unsigned char const*, unsigned long, xercesc_3_1::XMLFormatter*)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x234): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x262): multiple definition of `non-virtual thunk to SAX
PrintHandlers::writeChars(unsigned char const*, unsigned long, xercesc_3_1::XMLFormatter*)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x262): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x26a): multiple definition of `SAXPrintHandlers::error(
xercesc_3_1::SAXParseException const&)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x26a): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x39a): multiple definition of `non-virtual thunk to SAX
PrintHandlers::error(xercesc_3_1::SAXParseException const&)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x39a): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x3a4): multiple definition of `SAXPrintHandlers::fatalE
rror(xercesc_3_1::SAXParseException const&)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x3a4): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x4d4): multiple definition of `non-virtual thunk to SAX
PrintHandlers::fatalError(xercesc_3_1::SAXParseException const&)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x4d4): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x4de): multiple definition of `SAXPrintHandlers::warnin
g(xercesc_3_1::SAXParseException const&)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x4de): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x60e): multiple definition of `non-virtual thunk to SAX
PrintHandlers::warning(xercesc_3_1::SAXParseException const&)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x60e): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x618): multiple definition of `SAXPrintHandlers::unpars
edEntityDecl(unsigned short const*, unsigned short const*, unsigned short const*, unsigned short const*)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x618): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x61d): multiple definition of `non-virtual thunk to SAX
PrintHandlers::unparsedEntityDecl(unsigned short const*, unsigned short const*, unsigned short const*, unsigned short const*)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x61d): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x624): multiple definition of `SAXPrintHandlers::notati
onDecl(unsigned short const*, unsigned short const*, unsigned short const*)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x624): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x629): multiple definition of `non-virtual thunk to SAX
PrintHandlers::notationDecl(unsigned short const*, unsigned short const*, unsigned short const*)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x629): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x630): multiple definition of `SAXPrintHandlers::charac
ters(unsigned short const*, unsigned long)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x630): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x666): multiple definition of `non-virtual thunk to SAX
PrintHandlers::characters(unsigned short const*, unsigned long)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x666): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x66e): multiple definition of `SAXPrintHandlers::endDoc
ument()'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x66e): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x673): multiple definition of `non-virtual thunk to SAX
PrintHandlers::endDocument()'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x673): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x67a): multiple definition of `SAXPrintHandlers::endEle
ment(unsigned short const*)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x67a): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x6cd): multiple definition of `non-virtual thunk to SAX
PrintHandlers::endElement(unsigned short const*)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x6cd): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x6d4): multiple definition of `SAXPrintHandlers::ignora
bleWhitespace(unsigned short const*, unsigned long)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x6d4): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x70a): multiple definition of `non-virtual thunk to SAX
PrintHandlers::ignorableWhitespace(unsigned short const*, unsigned long)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x70a): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x712): multiple definition of `SAXPrintHandlers::proces
singInstruction(unsigned short const*, unsigned short const*)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x712): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x7aa): multiple definition of `non-virtual thunk to SAX
PrintHandlers::processingInstruction(unsigned short const*, unsigned short const*)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x7aa): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x7b4): multiple definition of `SAXPrintHandlers::startD
ocument()'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x7b4): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x7b9): multiple definition of `non-virtual thunk to SAX
PrintHandlers::startDocument()'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x7b9): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x7c0): multiple definition of `SAXPrintHandlers::startE
lement(unsigned short const*, xercesc_3_1::AttributeList&)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x7c0): first defined here
C:\Users\Mati\AppData\Local\Temp\cctzntQK.o:SAXPrintHandlers.cpp:(.text+0x925): multiple definition of `non-virtual thunk to SAX
PrintHandlers::startElement(unsigned short const*, xercesc_3_1::AttributeList&)'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x925): first defined here
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x44): undefined reference to `_imp___ZN11xercesc_3_16XMLUni22fg
XercescDefaultLocaleE'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x64): undefined reference to `_imp___ZN11xercesc_3_116XMLPlatfo
rmUtils10InitializeEPKcS2_PNS_12PanicHandlerEPNS_13MemoryManagerE'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x76): undefined reference to `_imp___ZN11xercesc_3_116XMLPlatfo
rmUtils9TerminateEv'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0xd8): undefined reference to `_imp___ZN11xercesc_3_116XMLPlatfo
rmUtils9TerminateEv'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x211): undefined reference to `_imp___ZN11xercesc_3_116XMLPlatf
ormUtils9TerminateEv'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x4b2): undefined reference to `_imp___ZN11xercesc_3_116XMLPlatf
ormUtils9TerminateEv'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x543): undefined reference to `_imp___ZN11xercesc_3_116XMLPlatf
ormUtils9TerminateEv'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x57a): undefined reference to `_imp___ZN11xercesc_3_17XMemorynw
Ej'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x583): undefined reference to `_imp___ZN11xercesc_3_116XMLPlatf
ormUtils15fgMemoryManagerE'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x5a3): undefined reference to `_imp___ZN11xercesc_3_19SAXParser
C1EPNS_12XMLValidatorEPNS_13MemoryManagerEPNS_14XMLGrammarPoolE'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x5c4): undefined reference to `_imp___ZN11xercesc_3_19SAXParser
19setValidationSchemeENS0_10ValSchemesE'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x5e1): undefined reference to `_imp___ZN11xercesc_3_19SAXParser
15setDoNamespacesEb'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x5fe): undefined reference to `_imp___ZN11xercesc_3_19SAXParser
11setDoSchemaEb'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x617): undefined reference to `_imp___ZN11xercesc_3_19SAXParser
24setHandleMultipleImportsEb'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x634): undefined reference to `_imp___ZN11xercesc_3_19SAXParser
31setValidationSchemaFullCheckingEb'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x6dc): undefined reference to `_imp___ZNK11xercesc_3_19SAXParse
r13getErrorCountEv'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x700): undefined reference to `_imp___ZN11xercesc_3_116XMLPlatf
ormUtils9TerminateEv'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x734): undefined reference to `_imp___ZN11xercesc_3_116XMLPlatf
ormUtils9TerminateEv'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text+0x819): undefined reference to `_imp___ZN11xercesc_3_17XMemorydl
EPv'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text$_ZN4StrXC1EPKt[StrX::StrX(unsigned short const*)]+0x7): undefine
d reference to `_imp___ZN11xercesc_3_116XMLPlatformUtils15fgMemoryManagerE'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text$_ZN4StrXC1EPKt[StrX::StrX(unsigned short const*)]+0x18): undefin
ed reference to `_imp___ZN11xercesc_3_19XMLString9transcodeEPKtPNS_13MemoryManagerE'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text$_ZN4StrXD1Ev[StrX::~StrX()]+0x7): undefined reference to `_imp__
_ZN11xercesc_3_116XMLPlatformUtils15fgMemoryManagerE'
C:\Users\Mati\AppData\Local\Temp\ccJzlNBi.o:SAXPrint.cpp:(.text$_ZN4StrXD1Ev[StrX::~StrX()]+0x18): undefined reference to `_imp_
__ZN11xercesc_3_19XMLString7releaseEPPcPNS_13MemoryManagerE'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x52): undefined reference to `_imp___ZN11xercesc_3_116X
MLPlatformUtils15fgMemoryManagerE'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x8e): undefined reference to `_imp___ZN11xercesc_3_112X
MLFormatterC1EPKcS2_PNS_15XMLFormatTargetENS0_11EscapeFlagsENS0_10UnRepFlagsEPNS_13MemoryManagerE'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0xb6): undefined reference to `_imp___ZN11xercesc_3_112X
MLFormatterlsEPKt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0xc4): undefined reference to `_imp___ZN11xercesc_3_112X
MLFormatterlsEPKt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0xd6): undefined reference to `_imp___ZN11xercesc_3_112X
MLFormatterlsEPKt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0xea): undefined reference to `_imp___ZN11xercesc_3_112X
MLFormatterD1Ev'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x160): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterD1Ev'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x192): undefined reference to `_imp___ZN11xercesc_3_17X
MemorydlEPv'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x20a): undefined reference to `_imp___ZN11xercesc_3_17X
MemorydlEPv'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x29a): undefined reference to `_imp___ZNK11xercesc_3_11
7SAXParseException15getColumnNumberEv'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x2a9): undefined reference to `_imp___ZNK11xercesc_3_11
7SAXParseException13getLineNumberEv'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x2b8): undefined reference to `_imp___ZNK11xercesc_3_11
7SAXParseException11getSystemIdEv'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x3d4): undefined reference to `_imp___ZNK11xercesc_3_11
7SAXParseException15getColumnNumberEv'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x3e3): undefined reference to `_imp___ZNK11xercesc_3_11
7SAXParseException13getLineNumberEv'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x3f2): undefined reference to `_imp___ZNK11xercesc_3_11
7SAXParseException11getSystemIdEv'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x50e): undefined reference to `_imp___ZNK11xercesc_3_11
7SAXParseException15getColumnNumberEv'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x51d): undefined reference to `_imp___ZNK11xercesc_3_11
7SAXParseException13getLineNumberEv'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x52c): undefined reference to `_imp___ZNK11xercesc_3_11
7SAXParseException11getSystemIdEv'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x65e): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatter9formatBufEPKtmNS0_11EscapeFlagsENS0_10UnRepFlagsE'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x6a2): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEPKt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x6b3): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEPKt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x6c5): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x702): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatter9formatBufEPKtmNS0_11EscapeFlagsENS0_10UnRepFlagsE'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x73a): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEPKt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x74b): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEPKt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x769): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x77a): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEPKt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x7a2): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEPKt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x7ea): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x7fb): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEPKt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x87a): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x888): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEPKt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x89a): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x8ac): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x8ca): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEPKt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x8ec): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text+0x918): undefined reference to `_imp___ZN11xercesc_3_112
XMLFormatterlsEt'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text$_ZN11xercesc_3_115DocumentHandlerC2Ev[xercesc_3_1::Docum
entHandler::DocumentHandler()]+0x4): undefined reference to `_imp___ZTVN11xercesc_3_115DocumentHandlerE'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text$_ZN11xercesc_3_115DocumentHandlerD2Ev[xercesc_3_1::Docum
entHandler::~DocumentHandler()]+0x7): undefined reference to `_imp___ZTVN11xercesc_3_115DocumentHandlerE'
C:\Users\Mati\AppData\Local\Temp\ccF7gVrk.o:SAXPrintHandlers.cpp:(.text$_ZN11xercesc_3_115DocumentHandlerD1Ev[xercesc_3_1::Docum
entHandler::~DocumentHandler()]+0x7): undefined reference to `_imp___ZTVN11xercesc_3_115DocumentHandlerE'
等
有没有机会快速解决?不管怎样,谢谢!
答案 0 :(得分:1)
不要将.hpp文件放在编译器命令行中。它们由.cpp文件自动包含。
g ++ SAXPrint.cpp SAXPrintHandlers.cpp -o output
答案 1 :(得分:0)
我解决了我的问题,它比我想象的要简单。您需要做的就是使用flag:
-lxerces-c
效果很好,但感谢您的努力,伙计们!我很感激:)