当前位置: 技术问答>docker中文入门学习手册
iis7站长之家
RedHat:undefined reference to `xercesc_2_5::XMLString::transcode
来源: 互联网 发布时间:2016-08-14
本文导语: 代码从UNIX系统向LIUNX系统迁移过程中出现了问题: 部分代码头文件: #ifndef DOMPARSERERRORHANDLER_H_ #define DOMPARSERERRORHANDLER_H_ #include #include #include #include using std::string; XERCES_CPP_NAMESPACE_USE // -----------------------...
代码从UNIX系统向LIUNX系统迁移过程中出现了问题:
部分代码头文件:
#ifndef DOMPARSERERRORHANDLER_H_
#define DOMPARSERERRORHANDLER_H_
#include
#include
#include
#include
using std::string;
XERCES_CPP_NAMESPACE_USE
// ---------------------------------------------------------------------------
// Simple error handler deriviative to install on parser
// ---------------------------------------------------------------------------
class DOMParserErrorHandler : public DOMErrorHandler {
public:
// -----------------------------------------------------------------------
// Constructors and Destructor
// -----------------------------------------------------------------------
DOMParserErrorHandler();
~DOMParserErrorHandler();
// -----------------------------------------------------------------------
// Getter methods
// -----------------------------------------------------------------------
bool getSawErrors() const;
// -----------------------------------------------------------------------
// Implementation of the DOM ErrorHandler interface
// -----------------------------------------------------------------------
bool handleError(const DOMError& domError);
const string& getErrorMsg() const;
void resetErrors();
private :
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
DOMParserErrorHandler(const DOMParserErrorHandler&);
void operator=(const DOMParserErrorHandler&);
// -----------------------------------------------------------------------
// Private data members
//
// fSawErrors
// This is set if we get any errors, and is queryable via a getter
// method. Its used by the main code to suppress output if there are
// errors.
// -----------------------------------------------------------------------
bool fSawErrors;
string _errMsg;
};
部分makefile
XERCES_HOME=/home/rdtfare/rdhxp/xerces/xerces-c-src_2_8_0
ORACLE_HOME =/opt/app/ora10g/product/10.2.0
TUXDIR =/opt/app/tuxapp/TUX91/tuxedo9.1
TOSFTOOLS_HOME =/home/rdtfare/rdhxp/tosf/tosftools
FMLINC = -I$(CACHEMNGHOME)/Control
LIB_INCLUDE = -I$(TUXDIR)/include -I$(XERCES_HOME)/include -I$(ORACLE_HOME)/rdbms/demo/ -I$(ORACLE_HOME)/rdbms/public/ -I/ttlprog/software/SUNWspro/WS6U2/include/CCios
LIB = -L$(XERCES_HOME)/lib -lxerces-c -L$(ORACLE_HOME)/lib -L$(ORACLE_HOME)/rdbms/lib -locci –lclntsh
错误:
/home/rdtfare/memtest/src/cscache/src/CacheMng/XmlInterface/DOMParserErrorHandler.cc:40: undefined reference to `xercesc_2_5::XMLString::transcode(unsigned short const*)'
/home/rdtfare/memtest/src/cscache/src/CacheMng/XmlInterface/DOMParserErrorHandler.cc:42: undefined reference to `xercesc_2_5::XMLString::release(char**)'
那位大牛指导一下!在线等:
部分代码头文件:
#ifndef DOMPARSERERRORHANDLER_H_
#define DOMPARSERERRORHANDLER_H_
#include
#include
#include
#include
using std::string;
XERCES_CPP_NAMESPACE_USE
// ---------------------------------------------------------------------------
// Simple error handler deriviative to install on parser
// ---------------------------------------------------------------------------
class DOMParserErrorHandler : public DOMErrorHandler {
public:
// -----------------------------------------------------------------------
// Constructors and Destructor
// -----------------------------------------------------------------------
DOMParserErrorHandler();
~DOMParserErrorHandler();
// -----------------------------------------------------------------------
// Getter methods
// -----------------------------------------------------------------------
bool getSawErrors() const;
// -----------------------------------------------------------------------
// Implementation of the DOM ErrorHandler interface
// -----------------------------------------------------------------------
bool handleError(const DOMError& domError);
const string& getErrorMsg() const;
void resetErrors();
private :
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
DOMParserErrorHandler(const DOMParserErrorHandler&);
void operator=(const DOMParserErrorHandler&);
// -----------------------------------------------------------------------
// Private data members
//
// fSawErrors
// This is set if we get any errors, and is queryable via a getter
// method. Its used by the main code to suppress output if there are
// errors.
// -----------------------------------------------------------------------
bool fSawErrors;
string _errMsg;
};
部分makefile
XERCES_HOME=/home/rdtfare/rdhxp/xerces/xerces-c-src_2_8_0
ORACLE_HOME =/opt/app/ora10g/product/10.2.0
TUXDIR =/opt/app/tuxapp/TUX91/tuxedo9.1
TOSFTOOLS_HOME =/home/rdtfare/rdhxp/tosf/tosftools
FMLINC = -I$(CACHEMNGHOME)/Control
LIB_INCLUDE = -I$(TUXDIR)/include -I$(XERCES_HOME)/include -I$(ORACLE_HOME)/rdbms/demo/ -I$(ORACLE_HOME)/rdbms/public/ -I/ttlprog/software/SUNWspro/WS6U2/include/CCios
LIB = -L$(XERCES_HOME)/lib -lxerces-c -L$(ORACLE_HOME)/lib -L$(ORACLE_HOME)/rdbms/lib -locci –lclntsh
错误:
/home/rdtfare/memtest/src/cscache/src/CacheMng/XmlInterface/DOMParserErrorHandler.cc:40: undefined reference to `xercesc_2_5::XMLString::transcode(unsigned short const*)'
/home/rdtfare/memtest/src/cscache/src/CacheMng/XmlInterface/DOMParserErrorHandler.cc:42: undefined reference to `xercesc_2_5::XMLString::release(char**)'
那位大牛指导一下!在线等:
|
检查下xerces-c,这个库,(XERCES_HOME)/lib所指示的位置下是否有,版本是否和你的Linux版本一致。
|
说不定还真xerces-c这个库的版本不一致的原因?
|
不是你安装的吗,这个应该不是系统自带的吧?你应该安装你的linux对应的库。