zengkui - 2011-12-30

After installed the log4cpp and wrote a simple code just test wether it works, i got a core dump with code below.
Can anybody can help with this error?

include "/home/dev/zengkui/log4cpp_orig/include/log4cpp/Appender.hh"
#include "/home/dev/zengkui/log4cpp_orig/include/log4cpp/OstreamAppender.hh"
#include "/home/dev/zengkui/log4cpp_orig/include/log4cpp/Layout.hh"
#include "/home/dev/zengkui/log4cpp_orig/include/log4cpp/BasicLayout.hh"
#include "/home/dev/zengkui/log4cpp_orig/include/log4cpp/Priority.hh"
#include "/home/dev/zengkui/log4cpp_orig/include/log4cpp/NDC.hh"
#include "/home/dev/zengkui/log4cpp_orig/include/log4cpp/RollingFileAppender.hh"
#include "/home/dev/zengkui/log4cpp_orig/include/log4cpp/PatternLayout.hh"
#include "/home/dev/zengkui/log4cpp_orig/include/log4cpp/BasicConfigurator.hh"
#include "/home/dev/zengkui/log4cpp_orig/include/log4cpp/Category.hh"
#include <stdio.h>

void my_init_log()
{

        log4cpp::Layout* layout = new log4cpp::BasicLayout();
        log4cpp::RollingFileAppender* RFAppender = new log4cpp::RollingFileAppender ( "RollingFileAppender","./my_logtest.log" ) ;
        RFAppender->setLayout( layout );

        RFAppender->setMaxBackupIndex( 4 );
        RFAppender->setMaximumFileSize( 1024 );
        log4cpp::Category& mylogtest = log4cpp::Category::getInstance("mylogtest"); /* core dump*/
        mylogtest.setAppender( RFAppender );
}

void my_debug( const char *szText )
{
        log4cpp::Category& mylogtest = log4cpp::Category::getInstance("mylogtest");
        mylogtest.debug( szText );
}
void my_error( const char *szText )
{
        log4cpp::Category& mylogtest = log4cpp::Category::getInstance("mylogtest");
        mylogtest.error( szText );
}

int main()
{
        my_init_log();
        my_debug( "test debug" );
        my_error( "test error" );
        return 0;
}