wxWidgets 3.0

To add the repository, first import the key:

sudo apt-key adv --fetch-keys http://repos.codelite.org/CodeLite.asc

Then add the source:

sudo tee /etc/apt/sources.list.d/wxwidgets.list
deb http://repos.codelite.org/wx3.0.2/ubuntu/ $(lsb_release -sc) universe
sudo apt-get update

Install wxWidgets modules:

sudo apt-get install libwxbase3.0-0-unofficial libwxbase3.0-dbg libwxbase3.0-dev libwxgtk3.0-0-unofficial libwxgtk3.0-dbg wx3.0-doc wx3.0-examples

Create soft-link:

sudo ln -s /usr/include/wx-3.0-unofficial/wx /usr/include/wx 

To compile a single file, create a script named wxcompile and edit it with the content as below (assume with have subdirectory obj/Debug and bin/Debug:


if [ -z "${1}" ]
echo "$0 "
exit 1

FILE=`basename $1`
OBJF=`basename -s .cpp $CPPF`
g++ -g -c -Wall -DWX_PRECOMP -Winvalid-pch `wx-config --cppflags` -o obj/Debug/${OBJF} ${CPPF}

To link, create a script file name ‘wxlink’ and its content as below:


if [ -z "${1}" ]
echo "$0 "
exit 1


g++ -v obj/Debug/*.o `wx-config --libs` -o obj/Debug/$FOUT

For a bigger project which requires more complicated and conditional compilation, use Makefile.


About The Seeker

Silicon Valley
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s