Possible Duplicate:
Are there general guidlines for solving undefined reference/unresolved symbol issues?
I want to transform an xml to insert sql statements. I have ready the xml and xslt files and I know that transformation runs ok (tested with Oxygen).
Now, I’m coding this transformation with c++ unsuccessfully.
I have tried to include this libraries:
#include <libxml2/libxml/xmlversion.h>
#include <libxml2/libxml/parser.h>
#include <libxml2/libxml/valid.h>
#include <libxml2/libxml/xmlschemastypes.h>
#include <libxml2/libxml/xmlschemas.h>
#include <libxml2/libxml/xmlmemory.h>
#include <libxml2/libxml/debugXML.h>
#include <libxml2/libxml/HTMLtree.h>
#include <libxml2/libxml/xmlIO.h>
#include <libxml2/libxml/DOCBparser.h>
#include <libxml2/libxml/xinclude.h>
#include <libxml2/libxml/catalog.h>
#include <xalanc/Include/PlatformDefinitions.hpp>
#include <xercesc/util/PlatformUtils.hpp>
#include <xalanc/XalanTransformer/XalanTransformer.hpp>
but compiler show me a lot of errors in code like:
/home/kimpa2007/xml/src/main.cc:108: undefined reference to `xercesc_2_8::XMLUni::fgXercescDefaultLocale'
/home/kimpa2007/xml/src/main.cc:109: undefined reference to `xalanc_1_10::XalanTransformer::initialize(xercesc_2_8::MemoryManager&)'
Some one can explain how to code this transformation in a siple way?
They are several ways to make XSL transformation, see Process an XML document using an XSLT stylesheet micro howto:
I see that you are intended to use Xalan. Perhaps this is actually the right way. Notice that this library needs to be configured. You can get help to configure it on Xayno90 post. I copy-paste here steps:
step 1
step 2.
step 3.
step 4. Build Xerces
step 5. Build Xalan
step 6.
Check the directories of /usr/local/lib and /usr/local/include to confirm the both Xerces and Xalan are both installed
The needs to be a wiki for a Ubuntu specific install of these XML libraries and packages as there is no definitive guide for this currently plus the install methods for other OS had to be interpreted in order to fit this installation.
Also:
path/c/samples/XalanTransformthat is closer to your needsFinally, read this SO posts: