|Astonish Results Blog|
wxWidgets in Dev C++ - Lesson 1 of n - Installation
Having said that, what if you are a C/C++ developer and you want to finally transition to the GUI world? You have two options, either learn the WIN32 API and deal with the complexities associated with using WIN32 APIs or use one of the available open-source GUI frameworks such as GTK+ and wxWidgets. I have had the pleasure of using both GTK+ and wxWidgets. wxWidgets compared to GTK+ is slightly easier to use and provides a native look-and-feel as well as the ability to statically link your binaries to the library which could be considered a plus if you don’t want to bother with the distribution issues associated with dynamically-linked libraries. Whilst coding the GUI interface might be easier for you when you use wxWidgets, if the design of the interface is of a higher priority then GTK+ might be a better option due to the availability of GUI designers such as Glade. Glade allows the programmer to visually design the interface and then export an XML file to be fed to the GTK+ library. From a performance standpoint, wxWidgets provides a lighter implementation than GTK+ but that only comes from personal experience with no data to back up this claim.
Assuming I managed to convert you to wxWidgets ;), let’s start our first application by setting up the development environment. Having downloaded and installed Dev C++ version 220.127.116.11, start Dev C++ and click
Tools -> Check for Updates/Packages…. Select the devpacks.org community devpack server and click
Check for updates. There are several dependencies associated with wxWidget. Select
wxWidgetversion 2.6.1 unicode, you would need to select
libpngversion 1.2.8 and
Once downloaded, the installation process for all the packages should start. Continue normally as you would with any package you install and you will have a new menu in
All Programs -> Bloodshed Dev-C++entitled “wxWidgets” which has the help file. The help file is very important as you will be referring to it constantly throughout the development of any GUI application.
wxWidgets in Dev C++ - Lesson 2 of n - Hello World using the reference manual