In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces Fedora 6 how to use log4cxx version 0.97, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor with you to understand.
The version that uses log4cxx is 0. 97, and the OS is Fedora 6. 0. The first problem encountered in the process of make is:
.. / include/log4cxx/xml/domconfigurator.h:249: error: extra qualification
'log4cxx::xml::DOMConfigurator::' on member 'subst'
It took nearly two hours to find the answer to the above question of Fedora 6. The answer is as follows:
Index: include/log4cxx/xml/domconfigurator.h =-- include/log4cxx/xml/domconfigurator.h (revision 384243) + include/log4cxx/xml/domconfigurator.h (working copy) @ @-246 working copy 7 + 246 apr_xml_elem*, const std::string& attrName 7 @ protected: static LogString getAttribute (apr_xml_elem*, const std::string& attrName);-LogString DOMConfigurator::subst (const LogString& value); + LogString subst (const LogString& value)
/ / to change the above function declaration to this protected in the source code:
Helpers::Properties props
Then, when compiling to / tests/src/util/filter.cpp, the prompt "'RegEx' is not declared in this scope" goes into the filter.cpp file and sees that the file uses the regex feature in the boost library.
# include # include "filter.h" using namespace log4cxx; using namespace log4cxx::helpers; using namespace boost; String Filter::merge (const String& pattern, const String& in, const String& fmt) {USES_CONVERSION; std::string convPattern = T2A (pattern.c_str ()); std::string convIn = T2A (in.c_str ()); std::string convFmt = T2A (fmt.c_str ()); std::string result = RegEx (convPattern) .Merge (convIn, convFmt) Return A2T (result.c_str ());}
The first thing that comes to mind in Fedora 6 is that the "- lboost_regex" was not added when gcc, the compilation option "- lboost_regex" was added to Makfile.in, or the error occurred.
*. Check the source code of the boost library and find that the RegEx function is defined in cregex.hpp instead of regex.hpp. It may be that the boost library has been updated (the RegEx function has been moved to the definition in cregex.hpp), while log4cxx still uses the old boost library by default.
Fedora 6 this error changes the header file to compile OK.
Thank you for reading this article carefully. I hope the article "how to use log4cxx version 0.97 in Fedora 6" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.