-- 作者:zhle
-- 发布时间:4/14/2005 7:26:00 PM
-- 请教高手,在C++中的include中加入xeces_c后如何运用?
我在C++中加入了xerces_c后用#include""包含进所耍的*。hpp后,为何在其引用*。hpp 中的类时总说没有定义此类或文件名为空,希望高手们能帮我想想办法。谢谢。 #ifndef Dataflow_Dataflow_StrX_h #define PSECORE_Dataflow_StrX_h 1 #if defined(__sgi) && !defined(__GNUC__) && (_MIPS_SIM != _MIPS_SIM_ABI32) #define IRIX #pragma set woff 1375 #pragma set woff 3303 #endif #include "xercesc/util/XMLString.hpp" #include <xercesc/util/PlatformUtils.hpp> #include <xercesc/sax/SAXException.hpp> #include <xercesc/sax/SAXParseException.hpp> #include <xercesc/parsers/XercesDOMParser.hpp> #include <xercesc/dom/DOMNamedNodeMap.hpp> #include <xercesc/dom/DOMText.hpp> #include <xercesc/sax/ErrorHandler.hpp> #if defined(__sgi) && !defined(__GNUC__) && (_MIPS_SIM != _MIPS_SIM_ABI32) #pragma reset woff 1375 #pragma reset woff 3303 #endif #include <iostream> #include"xercesc/util/XMLString.hpp" //我自己加入的内容。 namespace SCIRun { class StrX { public : StrX(const XMLCh* const toTranscode) { // Call the private transcoding method fLocalForm = XMLString::transcode(toTranscode); //编译时XMLString类找不到。 } ~StrX() { delete [] fLocalForm; } // ----------------------------------------------------------------------- const char* localForm() const { return fLocalForm; } private : // ----------------------------------------------------------------------- char* fLocalForm; }; std::ostream& operator<<(std::ostream& target, const StrX& toDump); } // End namespace SCIRun #endif
|