1. 설치 과정 (Windows, wxWidgets 2.8.7, Code::Blocks 1.0rc2 기준)- MinGW(Automated MinGW Installer) 설치: 설치 옵션에서 MinGW base tools, g++ compiler, MinGW Make 선택
- GDB 설치 (설치 폴더는 MinGW가 설치되어 있는 폴더로)
- PATH 환경변수에 MinGW의 bin 폴더 추가
C:\MinGW\bin
C:\MinGW\mingw32\bin
- wxWidgets 설치(wxMSW-Setup.exe)
- WXWIN 환경변수 등록(불필요하다면 생각한다면 생략)
set WXWIN=C:\wxWidgets-2.8.7
- wxWidgets 빌드 (debug 버전과 release 버전을 모두 빌드할 필요가 있음)
cd %WXWIN%\build\msw
mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release clean
mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release
mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=debug clean
mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=debug
(* %WXWIN%\lib\gcc_dll 폴더에 라이브러리(.a) 파일들과 DLL 파일들이 생성된다. 이름 뒤에 'd'가 붙어 있는 것들이 debug 버전으로 빌드한 것들이다. *)
- wxWidgets의 include 폴더에서 setup.h 파일 생성
cd %WXWIN%\include\wx
ren setup_redirect.h setup.h
- Code::Blocks 설치(1.0rc2)
- 7-Zip 설치 (이미 설치되어 있다면 통과)
- Code::Blocks Forum에서 최신 Nightly Build를 받아 Code::Blocks 폴더에 설치: CB_20071224_rev4750_win32.7z, wxmsw28u_gcc_cb_wx287.7z
- Code::Blocks를 위한 기존 wxWidgets DLL 삭제: wxmsw26_gcc_cb.dll
2. Code::Blocks에서 테스트 프로그램 빌드- 프로젝트 빌드 위저드('File>New>Project...')에서 'wxWidgets project'를 선택해서 새 wsWidgets 프로젝트 생성
- wxWidgets 폴더 위치 지정 (예를 들어 'C:\wxWidgets-2.8.7')
- 'wxWidgets Library Settings'에서 다음 옵션 선택
- Use wxWidgets DLL
- Enable unicode
- 프로젝트 빌드 옵션('Project>Build Options')의 'Linker settings'에서 링크 라이브러리 목록 수정 (다음 예는 Release 빌드의 경우이고, Debug 빌드에 대해서도 같은 방식으로 수정한다.)
- libwxmsw28u_core.a를 libwxmsw28u.a로 수정
- libwxbase28u.a 제거
- 프로젝트 빌드 ('Build>Build')
- 빌드한 테스트 프로그램 실행 ('Build>Run')
(* 참고로 Code::Blocks 밖에서 실행하려면 %WXWIN%\lib\gcc_dll 폴더에 있는 wxmsw28u_gcc_custom.dll 파일을 .exe 파일과 같은 폴더에 복사하거나 C:\Windows\System32\ 폴더에 복사한다. *)
3. 참고 도서4. 참고 URL
이 글과 관련있는 글을 자동검색한 결과입니다 [?]