How can I add the wxwidgets
library to my Windows exrm
build? Currently, when I run my exrm-built application on Windows or try to use :wx.new()
, I receive a message:
** (UndefinedFunctionError) function
:wx.new/0
is undefined (module:wx
is not available)
I managed to solve my problem by adding a
relx.config
file to therel
directory in my project. Getting the syntax right was a little challenging, but I noticed thatmix release
created a temporaryrel\.files
directory while it was running. In that directory is a generated version ofrelx.config
that you can use for reference. Since the mix task takes a while to run, there is time to open that file and peek at its contents.With an app named
foo
, the contents of therelx.config
file was just one line:The only part I added was the ",wx".
I ran
mix release --prod
once again and then extracted therel\foo\releases\0.0.1\foo.tar.gz
file into a test directory. From that test directory,.\bin\foo console
ran my application with all the GUI working as expected.