To build a DLL using the /MT run-time library and log4cxx, add the log4cxx source into your project and set the LOG4CXX_STATIC environment variable. If you try linking with a static library, you will only get the classes that you call directly. The ones that are expected to be present when the configuration is read will not have been linked into your DLL.
Mismatching run-time libraries is a easy way to manufacture a crash.
Basically any time one DLL tries to deallocate some resource allocated
by a DLL using a different run time library (and that includes two
DLLs that each use /MT since they have the own instances of the run-
time library), bad things will happen.
- LOG4CXX_DECODE_CHAR Crash on windows Zhou Tao
- Re: LOG4CXX_DECODE_CHAR Crash on windows Zhou Tao
- Re: LOG4CXX_DECODE_CHAR Crash on windows Curt Arnold