[prev in list] [next in list] [prev in thread] [next in thread]
List: xerces-c-dev
Subject: moving from gcc 2.96 to 3.4.6 the program didn't more recognize xerces namespace
From: "AESYS S.p.A. [Enzo Arlati]" <enzo.arlati () aesys ! it>
Date: 2006-03-31 14:55:06
Message-ID: CF19645C463D4948982AEE1C7F918FFA () aesys ! local
[Download RAW message or body]
I have a RedHat 7.3 and I have upgraded the gcc compiler from the old
unsopperted revision 2.96 to a newer rev. 3.4.6.
I got several incompatibility which I'm still fixing.
One of these is related to the xercesc code ( I'm using the xerecsc 2.7 ),
it's seems as if the namespace xerces is never recognized (ex. undefined
reference to `xercesc_2_7::XMLString::transcode(unsigned short const*)).
What I'm missing ?
Thank for the help I'll strongly hope you will give me.
I reported belowe a simple classe wich using xerces funzions
____________ util_xerces.h _____________
#ifndef UTIL_XERCES_H
#define UTIL_XERCES_H
#include <string>
#include <stdio.h>
#include <xercesc/util/PlatformUtils.hpp>
//#include <xercesc/util/XMLString.hpp>
#include <xercesc/dom/DOM.hpp>
#include <xercesc/dom/DOMDocument.hpp>
#include <xercesc/dom/DOMNode.hpp>
//using namespace std;
XERCES_CPP_NAMESPACE_USE
class util_xerces
{
public:
util_xerces();
~util_xerces();
static int compareXS(char * str, const XMLCh * xml);
static DOMNode* getChildByName(DOMNode *node, char *name);
static DOMElement * XmlAddEelement( DOMDocument * pParent, DOMElement *
dElement, std::string sElName, std::string skey, std::string svalue );
};
____________ util_xerces.cpp _____________
#include "util_xerces.h"
util_xerces::util_xerces() { }
util_xerces::~util_xerces() { }
int util_xerces::compareXS(char * str, const XMLCh * xml)
{
char *str1 = XMLString::transcode( xml);
int i = strcmp(str, str1);
XMLString::release(&str1);
return i;
}
__ belowe I reported the error I got when I try to compile the file __
make[3]: Entering directory
`/home/enzo/TESTPROJ/prd/b_BCM/src/InterfacciaGEST/InterfacciaGEST'
g++ -DHAVE_CONFIG_H -I. -I. -I.. -O2 -O0 -g3 -Wall -fno-exceptions -fno-chec
k-new -fexceptions -c util_xerces.cpp
/bin/sh ../libtool --mode=link --tag=CXX
g++ -O2 -O0 -g3 -Wall -fno-exceptions -fno-check-new -fexceptions -o
InterfacciaGEST util_xerces.o domprinterrorhandler.o
clsmsgspontaneomanutenzione.o clsmessaggiospontaneo.o cparallel.o managcmd.o
clssrvsocket.o clsipc.o ipcmemory.o ae_util.o
main.o -lpthread -lxerces-c -L/usr/local/xerces-c-src_2_7_0/lib
g++ -O2 -O0 -g3 -Wall -fno-exceptions -fno-check-new -fexceptions -o
InterfacciaGEST util_xerces.o domprinterrorhandler.o
clsmsgspontaneomanutenzione.o clsmessaggiospontaneo.o cparallel.o managcmd.o
clssrvsocket.o clsipc.o ipcmemory.o ae_util.o
main.o -lpthread -lxerces-c -L/usr/local/xerces-c-src_2_7_0/lib
util_xerces.o: In function `util_xerces::compareXS(char*, unsigned short
const*)':
/home/enzo/TESTPROJ/prd/b_BCM/src/InterfacciaGEST/InterfacciaGEST/util_xerce
s.cpp:32: undefined reference to `xercesc_2_7::XMLString::transcode(unsigned
short const*)'
/home/enzo/TESTPROJ/prd/b_BCM/src/InterfacciaGEST/InterfacciaGEST/util_xerce
s.cpp:34: undefined reference to `xercesc_2_7::XMLString::release(char**)'
util_xerces.o: In function `XStr::~XStr()':
/home/enzo/TESTPROJ/prd/b_BCM/src/InterfacciaGEST/InterfacciaGEST/util_xerce
s.cpp:23: undefined reference to `xercesc_2_7::XMLString::release(unsigned
short**)'
/home/enzo/TESTPROJ/prd/b_BCM/src/InterfacciaGEST/InterfacciaGEST/util_xerce
s.cpp:33: undefined reference to `xercesc_2_7::XMLString::release(char**)'
util_xerces.o: In function `XStr::XStr(char const*)':
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic