Hint for those trying to get WxWidgets to work on Mac

New to Elixir and had a great deal of trouble getting anything with WxWidgets working on my Mac. Having found many detailed and highly involved solutions in my Googling, I wanted to provide the dead-simple answer that I finally figured out, in hopes that someone else struggling with the same will find it useful in the future.

I used MacPorts to install Elixir and Erlang. Installing Elixir automatically installs Erlang as a dependency, but the version of Erlang that is automatically installed doesn’t include WxWidgets support. All that is required to fix this is to install Erlang with the wxwidgets variant selected. From the command line:

sudo port install erlang +wxidgets

There are a number of other dependencies that seemed to be installed automatically by MacPorts, but may need to be specified in this case. So, the full command line might be more like:

sudo port install erlang +hipe +ssl +odbc +wxwidgets

If you are using the JPortsUI GUI for MacPorts, merely select the Erlang package, then click on the “Variants” tab at the bottom of the window, tick the desired variants and hit the “Apply” button per normal.

In either case, MacPorts will deactivate, but not uninstall, any prior version of Erlang installed via MacPorts.

Others are probably sharper, but I hope someone will find this 5 minute solution it took me 5 hours to find useful. Best wishes.