블로그 이미지
귀여븐태연

카테고리

분류 전체보기 (61)
공지 (2)
소녀시대 (15)
유용한 정보 (19)
잡담 (8)
File (10)
Hardware (1)
하앜하앜 (0)
Game (1)
Programming (5)
iPhone (0)
맛집 (0)
Total31,035
Today5
Yesterday6

사자성어 유머

잡담 / 2014.07.30 18:39
色水河高十多(색수하고십다) 
性交河高十多(성교하고십다)
交尾河高十多(교미하고십다) 
八九二河高十多(팔구이하고십다)
雀織基河高十多(작직기하고십다)
ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ


저작자 표시
신고

'잡담' 카테고리의 다른 글

사자성어 유머  (0) 2014.07.30
-컬투쇼에소개된사연; 처제의 일기장-  (0) 2012.11.16
지름신 명언  (0) 2011.07.06
딸꾹질 멈추긔  (0) 2011.02.28
인간 쓰레기 빙고 게임  (0) 2011.02.28
여자들의 마음  (0) 2011.01.01
Posted by 귀여븐태연

출처 : http://letcoderock.blogspot.kr/2012/08/build-log4cxx-on-windows.html?showComment=1399861541598#c5237334710348640716


log4cxx is a good library for doing logging job in C++ project. However, the first barrier faced by the newbies is compiling the library from the source.

Some good guys have already built the binary file for us. For example:

http://www.dreamcubes.com/b2/software-development/28/log4cxx-for-win32-with-vs2005/ 

Sometimes, the provided binary version is too old or some bug fix in the trunk is required. Then you need to build it yourself.

In my case, the outdated vs2005 version in the above link has flows EXCEPTION_ACCESS_VIOLATION and doesn't support LOG4CXX_TRACE. So I decide to rebuild it myself.


Preparation


First of all, download the required sources.

  1. The latest log4cxx released. (i.e. download apache-log4cxx-0.10.0 (zip))
  2. The Apache Portable Runtime (APR) project. (i.e. download Win32 Source of APR and APR-util)

Before Building


The official building guideline is quite easy to follow.

1
2
3
4
5
6
7
unzip apr-1.2.11-win32-src.zip
rename apr-1.2.11 apr
unzip apr-util-1.2.10-win32-src.zip
rename apr-util-1.2.10 apr-util
cd apache-log4cxx-0.10.0
configure
configure-aprutil


But most Windows machine doesn't has 'sed' installed. It will say that "'sed'  is not internal or external command" while running configure-aprutil.bat. Actually, the guideline has answered how to do on this case.

"configure-aprutil.bat uses "sed" to modify apu.hw and apr_ldap.hw to disable APR-Iconv and LDAP which are not necessary for log4cxx and problematic to build. If "sed" is not available, the modifications would be trivial to do in any text editor."

In the configure-aprutil.bat

1
2
sed -i -e "s/#define APU_HAVE_APR_ICONV\b.*/#define APU_HAVE_APR_ICONV 0/" ..\apr-util\include\apu.hw
sed -i -e "s/#define APR_HAS_LDAP\b.*/#define APR_HAS_LDAP 0/" ..\apr-util\include\apr_ldap.hw


So the modification job is easy:

  1. Find the file apr-util\include\apu.hw
  2. Search "#define APU_HAVE_APR_ICONV" on it
  3. Change the defined value from 1 to 0.
  4. Do the same job on file apr-util\include\apr_ldap.hw but the search string is "#define APR_HAS_LDAP" this time.

Compilation


The log4cxx version 0.10.0 download package has provided Visual Studio 6.0 workspace file, i.e. log4cxx.dsw, in its' projects folder.

Opening it by Visual Studio in any version you need. It will do the conversion with no harm. Then choose "Rebuild" in the Visual Studio and wait. Finally, it will give you the files log4cxx.dll and log4cxx.lib.


Build on trunk


However, apahce-log4cxx-0.10.0 is released several years ago. If the latest trunk version is need, go to the source repository page to checkout their trunk version by Subversion.

1
svn checkout http://svn.apache.org/repos/asf/logging/log4cxx/trunk apache-log4cxx

Copy all the checkout files to previous unzipped folder apache-log4cxx-0.10.0 and overwrite any file. Then do the rebuild job again.


One more thing


log4cxx.dll relies on CRT library installed in your development machine. Please make sure the same version of Visual Studio 2xxx C++ Redistributable package is deployed on the target machine. If not, the painful linkage error will come.

Of course, you can compile it as static library by following the instructions mentioned in the below link

http://mail-archives.apache.org/mod_mbox/logging-log4cxx-user/201002.mbox/%3C9cc05c621002180613l76d009f1v87ddeaaeffb50dd@mail.gmail.com%3E 

The main points are summarized as

  1. Set Configuration Properties->General->Configuration Type to Static Library (.lib)
  2. Set LOG4CXX_STATIC into Configuration Properties->Preprocessor.
  3. Set Configuration Properties->Code Generation->RunTime Library to Multi-threaded Debug (/MTd) on Debug channel and (/MT) on Release channel in ALL projects. (Let the dependent CRT library to be statically linked within the binary built.)


Now, please enjoy what open source community give us. Cheers~ 

저작자 표시
신고

'Programming > WINDOWS' 카테고리의 다른 글

Build log4cxx on Windows by Visual Studio 2xxx  (0) 2014.05.12
윈도 메세지 보는 함수 하앜하앜  (0) 2010.10.26
Posted by 귀여븐태연

출처 : http://okkks.tistory.com/985


기본 디렉토리 만들기

 

svn mkdir 명령어를 이용해서 trunk, tags, branches 디렉토리를 만든다.

]# svn mkdir svn://127.0.0.1/okkks.tistory.com/trunk 

svn mkdir 명령어를 사용할 수 없는 경우 나오는 내용이다.

 

svn mkdir 명령어를 사용하기 위한 설정

- ~/.bash_profile 맨 아래에 추가한다.

- source 명령어를 이용해서 .bash_profile에 추가한 내용을 적용한다.

]# cd ~

]# vi .bash_profile

<생략>

SVN_EDITOR=/usr/bin/vim

export SVN_EDITOR

]# source .bash_profile

 

 

svn mkdir 명령어 trunk, tags, branches를 각각 만든다.

저장 후 빠져나온다(:wq 입력)

“c”를 입력한다.

]# svn mkdir svn://127.0.0.1/okkks.tistory.com/trunk

svn://127.0.0.1/okkks.tistory.com/trunk

~

~

<생략>

 

:wq 입력해서 저장 후 빠져나온다.

입력한다.

 

#] svn mkdir svn://127.0.0.1/okkks.tistory.com/tags

 

 

#] svn mkdir svn://127.0.0.1/okkks.tistory.com/branches

 

 

디렉토리(trunk, tags, branches)가 만들어졌는지 확인

]# svn list svn://127.0.0.1/okkks.tistory.com

branches/

tages/

trunk/

 

 

 

저작자 표시
신고

'Programming > SVN' 카테고리의 다른 글

svn trunk, tags, branches 기본 디렉토리 만들기  (0) 2014.04.21
Posted by 귀여븐태연

최근에 달린 댓글

최근에 받은 트랙백

글 보관함