I *think* this is a mailing list for the Java
implementation of Xerces. You might want to ask this
question in the C++ Xerces list.

--- "Andreas B. Thun" <[EMAIL PROTECTED]> wrote:
> Hi!
> 
> I want to parse an XML file for it's elements
> and attributes (IŽd like to use the DOM parser).
> Unfortunately I get errors when compiling my
> simple program DomParse.cpp.
> The makefile seems ok to me but it is obv. not
> Can anybody help?
> 
> Regards,
> Andi
> 
> 
> 
> My program DomParse.cpp:
> -----------------------------------------------
> #include <xercesc/util/PlatformUtils.hpp>
> #include <xercesc/dom/DOM.hpp>
> #include <xercesc/parsers/XercesDOMParser.hpp>
> #include <xercesc/util/XMLUniDefs.hpp>
> 
> #include <string.h>
> #include <stdlib.h>
> 
> int main (int argc, char* args[]) {
> 
>      try {
>          XMLPlatformUtils::Initialize();
>      }
>      catch (const XMLException& toCatch) {
>          char* message =
> XMLString::transcode(toCatch.getMessage());
>          cout << "Error during initialization! :\n"
>               << message << "\n";
>          XMLString::release(&message);
>          return 1;
>      }
>      ...
> }
> 
> 
> Compilation:
> ------------
> g++ DomParse.cpp
> -I/user/abt/xerces/xerces-c-src2_2_0/include/
> -L/user/abt/xerces/xerces-c-src2_2_0/lib/ -lxerces-c
> -o DomParse.o
> 
> DomParse.cpp: In function `int main(int, char**)':
> DomParse.cpp:21: `XMLPlatformUtils' undeclared
> (first use this function)
> 
> 
> 
> Makefile:
> ---------
> CFLAGS      = -w -O -DAPP_NO_THREADS
> -DXML_USE_NO_THREADS
> INCLUDE_DIR =
> /user/abt/xerces/xerces-c-src2_2_0/include/
> LIB_DIR     =
> /user/abt/xerces/xerces-c-src2_2_0/lib/
> 
> SRC = DomParse.cpp
> 
> OBJ =   DomParse.o
> 
>
#----------------------------------------------------------------
> # use g++
>
#----------------------------------------------------------------
> COMPILER = g++
> 
> all : $(OBJ)
>       $(COMPILER) $(CFLAGS) -o DomParse $(OBJ)
> 
> 
>
#----------------------------------------------------------------
> # object files
>
#----------------------------------------------------------------
> DomParse.o : DomParse.cpp
>       $(COMPILER) $(SRC) -I$(INCLUDE_DIR) -L$(LIB_DIR)
> -lxerces-c -o $(OBJ)
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to