install and build mingw and wxwidgets...
TRANSCRIPT
Slide # Contents
2 Install TDM MinGW
8 Check Windows Path Variable
10 Confirm gcc -v installation
11 Download & Run wxWidgets Installer
15 Build wxWidgets library
21 Download & install Code::Blocks IDE
23 Create wxWidgets Project
27 Set wxWidgets Location
31-34 Every Project: set libwxmsw31u.a location
35 Build and run Project
Install and build MinGW and wxWidgets 8/29/2016
Slide 1
Install TDM MinGW GCC Compiler
Slide 2
Note: This is TDM -GCC 5.1
Slide 3
Download the64 bit installer
Download URL:http://tdm-gcc.tdragon.net/download
Create a new installation
Slide 4
64it install
Slide 5
Install directory off C:\which is the root directory
Slide 6
1. Confirm installedproperly
Slide 7
Slide 8
Windows->Computer(Rt Click)->Properties->
Advanced system settings->System Properties->
Environment Variables
2. Check the Windows Path environment variableto include path to Select options below
Slide 9
Make sure there is noother conflicting path toC:\MinGW within the 'Path' value
This should be automaticwith the TDM-GCC install
Go to command prompt 'cmd' and confirm that gcc is installed and PathVariable is correctly set
Enter 'gcc -v' as command – get response below
Slide 10
Download wxWidgets
Slide 11
Installer
Slide 12
Slide 13Run the wxWidgets 3.1.0 installer
Slide 14
Make sure the installationIs into the root directoryi.e. 'C:'
Follow instructionsto build wxWidgets
Slide 15
Change to the C:\wxWidgets-3.1.0\build\msw folderthen click on the navigation bar to get full path
Slide 16
Copy this path and paste into cmd windowto change cmd window to this folder location
Slide 17
1. open command prompt2. enter cd3. then right click mouse and paste the full path to the \build\msw folder4. press enter to change to that folder
REFERENCE ONLY Instructions for wxWidgets build command
http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef
Slide 18
gcc version 5.1.0 (tdm64-1) 8/30/2016
First Clean all the wxWidgets code
C:\wxWidgets-3.1.0\build\msw>mingw32-make -f makefile.gcc SHARED=1 MONOLITHIC=1 UNICODE=1 BUILD=release clean
Then Build with this instruction:
C:\wxWidgets-3.1.0\build\msw>mingw32-make -f makefile.gcc SHARED=1 MONOLITHIC=1 UNICODE=1 BUILD=release
use these instructions to build wxWidgets library – each one is a single command line
each one is a single command line
Slide 19
Command line to start library build….see previous slide for details
This process can take 30-45 minutes on a current computerMaybe longer - Make sure the process runs to completion…..
Build complete
Slide 20
Slide 21
2. Download and install Code::Blocks IDE onlyhttp://www.codeblocks.org
1. If you have a previous Code::BlocksInstallation – Delete the old one first!
3. Running the installer
Slide 22
1. First time only - Start Code::Blocks2. Select:Settings->Compiler->Toolchain executables
3. MAKE sure that the properGCC directory is detected
You may have to enterthe directory with eachbutton and choose the proper compiler and linker
Code::Blocks – create a wxWidgets project Slide 23
1.
2.
Slide 24
Slide 25Create your own CodeBlocks folder to contain ALL your projects
Slide 26
Make the project'Frame Based'
Slide 27FIRST TIME ONLY: Browse to location for wxWidgets-3.1.0
You will encounter the following dialogs
Ignore warnings and proceed
1. Browse to location
2. Close Window
3. Yes
Browse to folderFor wxWidgets
Slide 28
Slide 29
Release version only – no Debug library was built
Select same options as wxWidgets library was compiled with, i.e.mingw32-make -f makefile.gcc SHARED=1 MONOLITHIC=1 UNICODE=1 BUILD=release
Slide 30
Slide 31
EVERY PROJECT: Code::Blocks project wizard is expectingwxWidgets 3.0.2, but wxWidgets 3.1.0 MUST be usedWill have to specifiy so linker can find – the answer is to ignore at this point
Slide 32Now must specify where the libwxmsw31u.a library is located
1. Rt. Click Project->Build Options->Linker Settings2. Edit library settings3. Browse to correct library
Slide 33Browse to Location of libwxmsw31u.a
NO
Slide 34
Proper selection of library locationC:\wxWidgets-3.1.0\lib\gcc_dll\libwxmsw31u.a
Build
Slide 35
Note: 0 errors – so ok to run
Too many warnings? Turn them off
1. Right click project
2. Select Build Options
3. Compiler flags
4. Turn off warnings
Slide 36
Slide 37
Run theprogram