[ https://issues.apache.org/jira/browse/LOGCXX-302?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joseph Southwell reassigned LOGCXX-302: --------------------------------------- Assignee: Joseph Southwell (was: Curt Arnold) > Initializing Error c0150002 when loading an application, linking to Log4CXX > --------------------------------------------------------------------------- > > Key: LOGCXX-302 > URL: https://issues.apache.org/jira/browse/LOGCXX-302 > Project: Log4cxx > Issue Type: Bug > Components: Build > Affects Versions: 0.10.0 > Environment: Windows XP SP2 x32; Windows Vista Business x32; Visual > Studio 2005/2008 Professional; > Reporter: Michael Steinecke > Assignee: Joseph Southwell > Priority: Blocker > Attachments: log4cxx.dll, log4cxx.dll.intermediate.manifest, > log4cxx.sln, log4cxx.vcproj > > > I've successfully build an little console application which which staticly > links to log4cxx, written in unmanaged C++. When I try to run the application > on any PC but my developmentel one, I get this error: > "The application failed to initialize properly (0xc0150002). Click on Ok to > terminate the application." > Firstly I thought it was due to missing VC redistributals or missing manifest > files, but even ensuring the availibity of those, didn't help. Also, the > dependancy walker lists no missings for log4cxx or the application. > Actually I build log4cxx and the App with Visual Studio 2008, professional > edition. > In all cases, the OS is Windows XP SP2 with the latest Hotfixes and patches. > Things I tryed to resolve the error: > Using an build from http://littletux.homelinux.org/log4cxx/. > Building the dll with VS 2005 SP1 > Compiling with /MT instead of /MD and vice versa (for both versions of VS) > Building the App without linking to log4cxx to detect the problem and as > workaround (no errors here - it's a problem due to log4cxx) > Running the App on another machine with installed VS2005 OR VS2008, the same > error occures. > I hope someone will have an idea or another input for me. > The developmental PC configuration: > Win XP SP2 > Versions of Visual Studio: 2008, 2005 SP1, 6 SP6, 1.52 > The code including the library (mostly from the intruduction to Log4CXX): > // include log4cxx header files. > #include <log4cxx/logger.h> > #include <log4cxx/helpers/exception.h> > using namespace log4cxx; > using namespace log4cxx::helpers; > // global staticPointer to an Logger > static LoggerPtr logger(Logger::getLogger("base")); > // End log4cxx > int _tmain(){ > LoggerPtr logger(log4cxx::Logger::getLogger(_T("base.main"))); > BasicConfigurator::configure(); > LOG4CXX_DEBUG(logger, _T("BasicConfigurator loaded.")); > if (_tcscmp(argv[i-1],_T("/cl"))==0){ > // Load a log4j config file > try > { > // BasicConfigurator replaced with PropertyConfigurator. > PropertyConfigurator::configure(argv[i]); > useCL = true; // Flag setzen dass PropertyConfigurator > verwendet wird. > LOG4CXX_DEBUG(logger, _T("BasicConfigurator with > PropertyConfigurator overloaded.")); > } > catch(Exception&) > { > LOG4CXX_FATAL(logger, _T("PropertyConfigurator konnte > nicht geladen werden!")); > return EXIT_FAILURE; > } > } > // go on with the program - many LOG4CXX_YYYYY Macros are used > } -- This message was sent by Atlassian JIRA (v6.1.5#6160)