The problem with wxWidgets – pt. 1

wxWidgets is extremely newbie-unfriendly. I’ve spent perhaps 10 hours and I STILL can’t get a regular window to open.

The problem is with its distribution method and its setup. Let’s do some overviews:

wxWidgets is often compared to Qt, another GUI library, and unlike Qt, wxWidgets is cleared to be used in any type of program, commercial or open-source. Qt, owned by Nokia, will result in me having to pay money for a commerical license. Despite Qt’s wider range of platforms (including non-smartphones and so on), I chose wxWidgets for its less-restrictive licensing terms. This means that if I decide to ever sell Asylum or develop commercially with my GUI, wxWidgets will give me no problems.

But wxWidgets has major problems with its documentation.

Unlike SFML, wxWidgets is left unbuilt. What does this mean? This means that you will most likely have to go into the Command Console on Windows and manually compile your library.

What? Yes. This means that you’ll have to compile wxWidgets like your Hello World program.

WHY?! I’ve been frustrated by the amount of options and ways you can compile wxWidgets. Thankfully, this has introduced me to important programming concepts,but learning these this way is hell.

First of all, I had to compile wxWidgets. At the time of this article, I am currently compiling wxWidgets for the THIRD time in an attempt to make it work:

http://wiki.wxwidgets.org/WxWidgets_Build_Configurations

HOLY SMOKES! I’M A NEWBIE, DON’T KILL ME! But after hours of research, I found out that there are several options:

  1. wxWidgets can be built to work with Unicode or ANSI. Given Unicode is better for internationalization and language translations, I compiled with UNICODE=1.
  2. wxWidgets can be built for a Debug or Release version. Given that I have no idea that I am doing and don’t know what debugging exactly is (at least the way they’re describing it), I chose to build wxWidgets as BUILD=release.
  3. wxWidgets can be built as a static or dynamic library. Basically, do I want to bundle wxWidgets into my executable file and inflate my final file size, or do I want to include the code on the side so that I can link it up to my executable program when it needs it? Since the tutorial says to build wxWidgets as a “SHARED” file (dynamic), I chose to build wxWidgets as SHARED=1.
  4. wxWidgets can be built into one file, or as a monolithic file. Doesn’t sound good–wxWidgets people often say that wxWidgets already bundles enough useless libraries into its all-encompassing #include “wx.h” file, so I decided to build without it monolithic. No idea what it mean, though.

And after 30-40 minutes, BOOM! wxWidgets is built! But wait! There’s more! Now I can freak out over the compiler and linker! I can’t compile my code without compiling with the right “-whatever” parameters and the right link directories! GAH! Nothing’s working!

Unfortunately, my chief problem is that I’m compiling with a “64-bit incompatible compiler.” This is complete BS, as I am using the TDM-GCC mingw64 compiler! I am using a 64-bit version! This is just ridiculous. No help for the weary.

Leave a comment