Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: snayak on January 22, 2014, 10:06:57 am

Title: [Solved] Setup CodeBlocks, MingW and wxWidgets on Windows7.
Post by: snayak on January 22, 2014, 10:06:57 am
Dear All,

Here is a procedure to setup CodeBlocks MingW and wxWidgets in Windows 7.
I didn't find the whole procedure on a single page. So, posting it for others who may need it, and can save a lot of time needed to collect all these info.

Setup CodeBlocks MingW and wxWidgets in Windows 7
----------------------------------------------------------------
0. Ensure 2 GB RAM on system.
1. Install CodeBlocks 13.12 which has MingW (TDM GCC 4.7.1)
2. Copy C:\Program Files\CodeBlocks\MingW to C:\MingW
3. Get Wxwidgets 2.8.12 source zip file and unzip it to get C:\wxMSW-2.8.12
4. Open cmd.exe
5. SET PATH=%PATH%;C:\MingW\bin
6. cd C:\wxMSW-2.8.12\build\msw
7. mingw32-make -f makefile.gcc BUILD=debug SHARED=1 MONOLITHIC=1 UNICODE=1 CXXFLAGS=-fno-keep-inline-dllexport
8. It takes 40-45 minutes to build.

9. Now Open CB
10. Create a new wxwidgets project.
11. Choose wxwidgets 2.8.x version.
12. Enter a Project Title.
13. Preferred GUI Builder: None; Application Type: Frame Based
14. Enter wxwidgets location. CB by default uses a global variable $(#wx) for this. Enter C:\wxMSW-2.8.12 as Base location of this global variable.
15. Tick on Create "Debug" configuration
16. Tick all three options (1. use wx DLL, 2. wx is monolithic library 3. enable unicode)in "wxwidgets library settings".
17. Tick "Create empty project" in "miscellaneous settings". Keep all other options untick and empty.
18. Add files recursively to project.
19. Build.
20. Run.

Sincerely,
Srinivas Nayak
Title: Re: [Solved] Setup CodeBlocks, MingW and wxWidgets on Windows7.
Post by: stahta01 on January 22, 2014, 10:25:13 am
Quote
2. Copy C:\Program Files\CodeBlocks\MingW to C:\MingW

Warning step two tends to break all MinGW GCC installation except for that one.

FYI: I suggest this link as a starting point for this topic http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef (http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef)

Tim S.