Home  | Contact


www.boks.com


WxWidgets Cross Compiling

I usewxWidgets for building graphical applications. wxWidgets is a cross-platform C++ toolkit that provides support for Graphical User Interface (GUI) design, files, memory management, printer support and many more aspects of building applications in a graphical environment. The toolkit is free to download and to use, for both personal and commercial goals.

Introduction

wxWidgets provides a very clean and well-documented class library. This is quite nice but not unique - other toolkits I worked with do that as well.
The main thing that makes wxWidgets stand out is the fact that your source code will compile, without almost no modifications, on a number of major platforms:
This means that you will only need to write your applications once and compile the code for different platforms as the need arises.

Since my personal emphasis lies on developing embedded applications, I am not really a MS Windows or Apple Mac OS X guru. However, it is very nice to be able to provide my users (who almost all use MS Windows) with the same desktop application that connects to my embedded  system without having the hassle of learning MS Windows.

 Professional software development

For my company, I use the following set-up:

Cross-Compiler set-up

The following steps need to be taken to cross-compile on FreeBSD:

tar xvfz wx2-6-2-mingw-msw-freebsd.tar.gz
mingw32-g++ -c `/usr/local/ming32/bin/wx-config --cppflags` foo.cpp
mingw32-g++ `/usr/local/ming32/bin/wx-config --libs` foo.o

In your makefile, the switch between using g++ and mingw32-g++ is easy to configure.