Erlang:如何将WX库纳入Rebar3版本
我如何在我的rebar3版本中包括Erlang(/lib/erlang/lib/wx-2.1.2)的WX库,这些库是eRlang(/lib/erlang/lib/wx-2.1.2)?我不明白在哪里复制这些文件以及如何在我的rebar.config文件中声明它们。
我在我的应用中使用此代码:
-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.
...
通过运行rebar3 compile
,然后rebar3 shell
works启动我的应用程序。但是,当我使用Rebar3 Release
时,我会得到以下输出:
===> 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
...
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
...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据文档在这里 relx将添加到发行中的应用; app>。
According to the documentation here applications that relx will add into release should be mentioned as a list see <app>.