As for the previous post(wxWidgets Gui Development On Windows) (Do not follow previous tutorial before this) targets the simplest approach now I’m going to explain a harder approach. Netbeans is one of my favorite development environments, its easy to use however its not lightweight. But it is recommended for larger projects. https://netbeans.org/downloads/
There are two downloads which we can use. I suggest the complete package.
(Note: Netbeans ‘All’ download needs JDK)
Downloading JDK (Optional)
Click the Java Platform (JDK) #u## not JDK # + Netbeans
Now uninstall all components from wxWidgets Gui Development On Windows tutorial this is a separate tutorial and those previous installations may cause problems.
Now install Netbeans (and JDK if needed).
Next thing you need is TDM-GCC http://tdm-gcc.tdragon.net/download
get the tdm-gcc-webdl and install it
Now we need to download and install wxWidgets http://wxwidgets.org/downloads/
Install it to default installation directory.
Now we need to add some environment variables
guide (Windows XP) http://www.computerhope.com/issues/ch000549.htm
guide (Windows 7) http://www.itechtalk.com/thread3595.html
these guides provide sample of how you can add an environment variables.
now set the user Path to C:\Mingw32\bin
open a command prompt and type g++ if you get above result its working
now type cd C:\wxWidgets-2.9.5\build\msw and press enter.
now use command mingw32-make -f makefile.gcc BUILD=release UNICODE=1 SHARED=0 MONOLITHIC=1 and press enter.
this is going to take a lot of time so go take a nap.
(I also recommend disabling antivirus)
Now we need to download 7zip http://www.7-zip.org/download.html
(7zip is optional if and only if you have 7zip installed.)
now we need to download prebuilt MSYS get it from http://nuwen.net/mingw.html
search for the msys 7zip file using your browsers built-in search
extract the msys-10.4.7z and you will get:
now goto 7zip installation directory (probably C:\Program Files\7-Zip or C:\Program Files (x86)\7-Zip)
and copy the 7z.exe and paste it where extract.bat is located (msys extracted dir)
and run extract.bat by double clicking it. now delete 7z.exe and extract.bat and you will get:
keep this folder opened for now and go to environment variables and add
WXCFG = gcc_lib\mswu
WXWIN = C:\wxWidgets-2.9.5
now we need to download wx-config.exe https://sites.google.com/site/wxconfig/
click the download there and get it. and copy it to C:\Mingw32\bin
now go to the folder where extracted msys is at and select all files and folders there and copy
now go to C:\Mingw32\ and paste (replace all the folders).
also copy and paste wx-config.exe to C:\Mingw32\bin
go to C:\Mingw32\bin and do the following
fire up Netbeans and go to tools –> options –> C/C++
click Add button and put following details
then creating the project
now we need to configure the project
Right click project and go to properties
do the configuration as illustrated above (under C++ Compiler option)
copy and paste `wc-config –cxxflags`
(it is backquote)
now go to linker option
apply settings as above illustrated.
copy and paste
-mthreads -lwxmsw29u -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregexu -lwxexpat -lkernel32 -luser32 -lwxregexu -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 –lwsock32
Please note that above code is a single line
(Why not `wx-config –libs` ? the wx-config always assumes that the build is debug)
you can input same data to both debug and release configurations. for now use the release configuration.
now get this code https://gist.github.com/JaDogg/6197941 and paste it to main.cpp
now build project and run project (see run menu).