wxWidgets and Me

It has come time for the ol’ Duder to start GUI programming. For the longest time, I have been a terminal junkie, mostly messing around with nCurses when I needed some semblance of interface (maybe I will release some of my early nCurses demo if I feel like it). Anyway, I messed around with Microsoft GUI programming back in college and found it clunky and constrictive (Then again, I have been a *NIX programmer since high school!)  and have generally stayed away from GUI programming (if it is worth doing, it can be done on the console!)

Now, I find myself in the need of some GUI programming, but most of the platforms suck. .NET, and Cocoa are too constraining as I want platform independence. The toolkits on Linux are a mess between GTK and QT4. QT4 was probably the best of the options but recent news, kind-of ugly widgets, and less-than stellar performance on my macbook (my main development platform) put the kibosh on that. So, I found another option: wxWidgets. The beauty is that it is not only cross-platform but it uses the native widgets of each platform so that it still looks like a native program.

After playing around with it, I decided to try to get it to work with XCode. Writing programs with a text editor and compiling them from the terminal is fine when you are doing text-mode programs that can write debug information to the console but now that I am doing GUI stuff, it is time to get to serious with my programming tools. So I found a tutorial on how to create wxWidgets projects in XCode. The major problem is that it is out of date and some of the information needs updated. Also, the template that you create doesn’t really work in the sense of being a general-purpose template and will lead to problems if you decide to create another program with a different name. So after comparing the template created to the actual general-purpose templates provided by XCode, I created a real wxWidgets template for XCode. It can be downloaded here (Right Click and Save As). Just unzip the file and copy the folder “wxWidgets Application” to “/Developer/Library/Xcode/Project Templates/Application”. 

NOTE: My distribution of wxWidgets comes from Macports. If you obtained it from elsewhere or have it in a custom location, you may want to reconfigure the build options. If any errors occur, please read the original tutorial. Also, be aware of the common error of FORGETTING to set the build architecture to i386 and not x86_64 (which is default). 

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

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