- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Unix C++ Compiler Error
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2019 05:51 PM
02-12-2019 05:51 PM
Unix C++ Compiler Error
Error:
tinyxml.h: In member function 'int TiXmlElement::AppendChild(const std::string&, const T&)':
tinyxml.h:1164: error: no matching function for call to 'TiXmlElement::InsertEndChild(TiXmlText&)'
tinyxml.h:586: note: candidates are: TiXmlNode* TiXmlNode::InsertEndChild(const TiXmlNode&)
Snippet of code that's giving error:
#ifdef TIXML_USE_STLtemplate < typename T > int AppendChild( const std::string& name, const T& value ) { std::ostringstream ss; ss << value; std::string valueStr = ss.str(); TiXmlText textNode = (valueStr.c_str()); TiXmlElement childElement = (name.c_str()); childElement.InsertEndChild(textNode); this->InsertEndChild(childElement); return TIXML_SUCCESS; } #endif
I use this command to compile the file : gmake -f xml.mk
Any idea where it goes wrong?
Appreciate your help on this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2019 10:44 PM
02-12-2019 10:44 PM
Re: Unix C++ Compiler Error
> [...] a c++ program [...]
Some open-source thing, or your own code, or what?
> [...] HPUX box [...]
uname -a
I know approximately nothing about C++, but if I had a question like
this, then I might reveal the compiler/version being used, and probably
what's on lines 586 and 1164 of tinyxml.h.
> I use this command to compile the file : gmake -f xml.mk
Of what use is that? What's the actual compile command?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2019 11:08 PM - edited 02-12-2019 11:20 PM
02-12-2019 11:08 PM - edited 02-12-2019 11:20 PM
Re: Unix C++ Compiler Error
> Some open-source thing, or your own code, or what?
yes it's an open source code, but we added this function.
> uname -a
HP-UX B.11.31 U ia64 0993361822 unlimited-user license
> I know approximately nothing about C++, but if I had a question like
this, then I might reveal the compiler/version being used, and probably
what's on lines 586 and 1164 of tinyxml.h.
we're using gcc version 4.2.3 to compile.
Please refer to comment for line number 586 and 1164.
TiXmlNode* InsertEndChild(const TiXmlNode& addThis ); // here's line 586
#ifdef TIXML_USE_STLtemplate < typename T > int AppendChild( const std::string& name, const T& value ) { std::ostringstream ss; ss << value; std::string valueStr = ss.str(); TiXmlText textNode = (valueStr.c_str()); TiXmlElement childElement = (name.c_str()); childElement.InsertEndChild(textNode); //here's line 1164 this->InsertEndChild(childElement); return TIXML_SUCCESS; } #endif
> Of what use is that? What's the actual compile command?
we use this command to compile the make file. We have few libraries needed to be recompiled in HP-UX as previously those files were compiled in Sun Solaris. After compiling the make file, then only we'll compile the main program using the same command.