개발2013.04.02 20:34



외제(?)  라이브러리 갖다 쓸때는 특히나... 항상 한글문제가  있다. 


오늘은 log4cplus 다.


한글인코딩 utf16으로 해서 내보냈더니.. 뻗어버리는 증세 발견 


방법은 간다.


아래 처럼 처리하면 파일에 한글이 잘 저장된다...  단,MS Windows  환경에서 임.


std::string locale_string = text.toLocal8Bit().constData();

LOG4CPLUS_DEBUG(_logger,locale_string.c_str() );



만일 UTF-8로 출력을 내보낼 필요가 있는 경우에는 


std::string utf8_text = text.toUtf8().constData();


이렇게...  

위에서 변수 text   는 QString 인스턴스 이다.

Posted by 퍼니로거 즐건록
개발2012.03.02 12:11




Pre-requisites for all platforms are:

    Subversion 1.4 or higher - see http://sourceforge.net/projects/win32svn/
    Python 2.4 or higher - see http://www.python.org
    SCons 1.0.0 or higher - see http://www.scons.org


Phase 1.  Download V8 source  by SVN

>svn svn checkout http://v8.googlecode.com/svn/trunk/ v8-read-only

>cd v8-read-only

Phase 2. Prepare environment values for MSVC++ 2010

>"C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"

Phase 3. build V8  for shared library.

#for release mode library
>scons mode=release library=shared msvcrt=shared env="PATH:%PATH%,LIB:%LIB%,INCLUDE:%INCLUDE%" d8



#for debug mode library
>scons mode=debug library=shared msvcrt=shared env="PATH:%PATH%,LIB:%LIB%,INCLUDE:%INCLUDE%" d8



( When I was choose static mode. V8.lib was too large size more than 200MB and too slow to use in my application build and there were several problems. but shared mode was good! so I suggest shared(dll) mode )

Good luck!

I referred following links.
http://code.google.com/intl/ko-KR/apis/v8/build.html
http://code.google.com/p/v8/wiki/BuildingOnWindows



Posted by 퍼니로거 즐건록