|
|
Choosing A Webhost: |
Re: On Static Linking - Could not instantiate class [org.apache.log4j.Conso: msg#00061apache.logging.log4cxx.user
On Nov 28, 2007, at 2:07 PM, Unnikrishnan Udinoor wrote: Hi, Use of log4cxx 0.9.7 is discouraged. Please consider moving to the SVN HEAD. I remember a lot of pain with using log4cxx 0.9.7 from a static library and those issues should be fixed in the SVN HEAD. The issue is due to the class registration information is only linked in when there is some explicit reference to the appender in the code. In this case, the linker did not see any reference to ConsoleAppender or RollingFileAppender when it linked your app, so those object files weren't linked into your app. Since they weren't linked the static constructor that adds those classes to the list of available classes and so you get the class not found messages. If you really want to use 0.9.7, you need to compel the linker to bring the appenders and layouts that you need into the app. You could do that by having something (even unreachable code) in your app call ConsoleAppender::getStaticClass(), etc.
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | On Static Linking - Could not instantiate class [org.apache.log4j.ConsoleAppender], Unnikrishnan Udinoor |
|---|---|
| Next by Date: | Re: Log4cxx in my project, unresolved symbols despite hours of work, Curt Arnold |
| Previous by Thread: | On Static Linking - Could not instantiate class [org.apache.log4j.ConsoleAppender], Unnikrishnan Udinoor |
| Next by Thread: | Compilation issue for VisualStudio2003, Benjamin de Dardel |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |