How do I include the wx libraries, that are shipped with erlang (/lib/erlang/lib/wx-2.1.2), in my rebar3 release? I do not understand where to copy those files and how to declare them in my rebar.config file.
I use this code in my app:
-module(main_window).
-include_lib("wx/include/wx.hrl").
-include("state_records.hrl").
-export([start/0]).
start() ->
Wx = wx:new(),
State = wx:batch(fun() -> create_window(Wx) end),
wxWindow:show(State#state.frame),
loop(State),
wx:destroy(),
ok.
...
Starting my app by running rebar3 compile
and then rebar3 shell
works. But when I use rebar3 release
I get the following output:
===> There are missing function calls in the release.
===> Make sure all applications needed at runtime are included in the release.
===> main_window:create_window/1 calls undefined function wxBoxSizer:new/1
===> main_window:create_window/1 calls undefined function wxFrame:connect/2
===> main_window:create_window/1 calls undefined function wxFrame:createStatusBar/2
===> main_window:create_window/1 calls undefined function wxFrame:new/4
===> main_window:create_window/1 calls undefined function wxFrame:setIcon/2
===> main_window:create_window/1 calls undefined function wxFrame:setMenuBar/2
===> main_window:create_window/1 calls undefined function wxFrame:setStatusText/3
===> main_window:create_window/1 calls undefined function wxIcon:new/2
...