This is a quick post just to tell people that wxWidgets compiles well on Windows on ARM.

In my journey with my new Surface Pro X I’ve been a bit obsessed with finding a development stack for GUI apps that is easy to use an runs natively under ARM. I know that both NodeJS and Electron are ready (they work quite well under Windows on ARM if you don’t use any native module) but I’m not keen into launching a full version of chrome every time I want to run a tiny GUI app. So I decided to check out what other options are available for me. I’m mostly interested in scripting languages and managed to compile Lua for the Surface Pro X already. So I started thinking that maybe some GUI toolkit for Lua might be the best way to move forward. I suspect that the most promising one is wxLua which uses wxWidgets toolkit. So my first task was to check if wxWidgets could actually be built for Windows on ARM.

Good news is that the maintainers of wxWidgets are probably saints and already provide all the plumbing needed. To be honest the compilation was so easy that I don’t understand why they are not shipping prebuilts of the toolkit for that platform already. I wish they were because compiling C/C++ stuff and dealing with Visual Studio is not something I’m comfortable doing. Anyway, compiling it was as easy as opening a cross-platform cmd.exe that loads the ARM stuff and doing:

nmake /f makefile.vc BUILD=release SHARED=0 UNICODE=0 TARGET_CPU=ARM64 RUNTIME_LIBS=static

I set these options because:

Apparently debugging is an issue. Not sure why.

DLLs sucks, I’d rather link things statically.

I’m tired of those missing Visual Studio Runtime DLLs errors so I set it to be static as well.

I got many errors in wxLua when I built with unicode support, so I disabled it.

With those options, everything builds correctly. I tried some of the included samples as well such as:

All of those worked but the webview sample was unstable and crashed when I opened some pages. I believe that this is OK since it is using Internet Explorer and God knows what kind of macgyvering is going on behind the scenes to get it working on ARM. Anyway, if I need a webview, I might just go with Electron.

One cool aspect of checking out these C/C++ samples is observing how nimble they are in terms of resource consumption. This is the task manager data for the minimal sample:

So, wxWidgets runs and runs well. I couldn’t get wxLua to build though. Basically the steps in cmake-gui.exe are all correct but the projects don’t build. They fail to find many of the wxWidgets include files. Thats something that I will look into probably in a future week as I am completely out of my depth.