The
scope or
lifetime of your LogCp doesnt cover the main scope. It is
essential to understand that issues. It is also very important if working with pointers and objects.
This should solve your problem:
int main(int argc, wchar_t* argv[])
{
LogCp::GetInstance(); LOG4CPLUS_WARN(LogCp::GetInstance()._logger, LOG4CPLUS_TEXT("test"));
}