Hi,
All messages are refer to the xercesc_2_8 symbols. Seems like you are
using 2.8 header files but aren't using a corresponding library.
Good luck!
Vitaly
Sean Ochoa wrote:
Hey all. I'm running Eclipse + Ubuntu + CDT. I'm getting this error after
having installed Xerces 3.1 through the synaptic pkg mgr.
My small base-line C++ app:
#include<xercesc/util/PlatformUtils.hpp>
using namespace xercesc;
#include<iostream>
using namespace std;
int main(int argc, char* argv[]){
try {
XMLPlatformUtils::Initialize();
}
catch (const XMLException& toCatch) {
// Do your failure processing here
return 1;
}
// Do your actual work with Xerces-C++ here.
XMLPlatformUtils::Terminate();
// Other terminations and cleanup.
return 0;
}
And, here's the error that I'm seeing:
**** Build of configuration Debug for project Blueberry ****
**** Internal Builder is used for build ****
g++ -O0 -g3 -Wall -c -fmessage-length=0 -omain.o ../main.cpp
g++ -oBlueberry main.o
main.o: In function `main':
/home/src/cpp/Blueberry/Debug/../main.cpp:12: undefined reference to
`xercesc_2_8::XMLUni::fgXercescDefaultLocale'
/home/src/cpp/Blueberry/Debug/../main.cpp:12: undefined reference to
`xercesc_2_8::XMLPlatformUtils::Initialize(char const*, char const*,
xercesc_2_8::PanicHandler*, xercesc_2_8::MemoryManager*, bool)'
/home/src/cpp/Blueberry/Debug/../main.cpp:21: undefined reference to
`xercesc_2_8::XMLPlatformUtils::Terminate()'
main.o:(.gcc_except_table+0x10): undefined reference to `typeinfo for
xercesc_2_8::XMLException'
collect2: ld returned 1 exit status
Build error occurred, build is stopped
Time consumed: 1011 ms.
Any ideas on how to resolve the build errors?
- Sean