Hi.
>"sax1.cc", line 23: Warning: String literal converted to char* in
initialization.
1 Warning(s) detected.
This message is just a warning, and will not cause an error.
>Undefined first referenced
> symbol in file
>
>__RTTI__1nRSAXParseException_ sax1.o
>SAXParseException::~SAXParseException() sax1.o
>void SAXParser::setDoValidation(const bool) sax1.o
>void SAXParser::setDoNamespaces(const bool) sax1.o
>void XMLPlatformUtils::Initialize() sax1.o
>SAXParser::SAXParser(XMLValidator*const) sax1.o
>SAXParseException::\
>SAXParseException(const SAXParseException&) sax1.o
>__RTTI__1nMXMLException_ sax1.o
>
>ld: fatal: Symbol referencing errors. No output written to a.out
These errors are reported by the linker. It is saying that it is
unable to find the functions and templates listed on the left
side of the error messages.
This is usually caused by leaving out the linker commands that
cause the program to link to the XML libraries. I'm assuming that
you have written the 'sax1.cc' program. When you compile the
program into an executable, you must also specify what library
the sax parser is located in, and tell the compiler to resolve
any functions or symbols using that library.
Add the following to your compile commands:
-L/path_to_sax_parser -lxerces-c1_3
where '/path_to_sax_parser' is the fully-qualified path to the
directory that contains the Xerces library, and 'xerces-c1_3'
should be the name of your version of the Xerces library, but
leaving off the 'lib' at the start of the name, and leaving
off the '.so' at the end of the name. The compiler is smart
enough to know that these will always be there, so you never
have to specify those parts of the library name.
I would guess that your compile line might look something like:
CC -g -I/path_to_Xerces_include_directories sax1.c \
-L/path_to_sax_parser_library -lxerces-c1_3 -o sax1
You will need to fill in the correct parameters for your system,
but it should be something like this. Note that if you are using
the Sun compilers for building your program, you should also have
built the Xerces library with the same compiler. Mixing compilers
will often cause you problems, because different compilers may
mangle the C++ symbols differently. If that is what you are doing,
it may also be the cause of not being able to find the symbols.
Regards,
--Carl
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]