WxErlang error message

I can't get wxErlang to work at all. Do I need to enable the module. Unable to find basic information related to it. Please help. I am looking for a very simple module example.

The error I get is

undefined Function wx: start / 0

+4
source share
3 answers

I just needed to enable wx lib using the following line

-include_lib("include/wx.hrl"). 

include / is the helper directory in my project containing the wx library.

-1
source

An empty frame should be displayed here:

 1> wx:new(). {wx_ref,0,wx,[]} 2> Frame = wxFrame:new(wx:null(), 0, "myFrame"). {wx_ref,36,wxFrame,[]} 3> wxFrame:show(Frame). true 
+4
source

To find ex-erlang-samples, you should send the following call to EShell to find the base directory for wx-erlang:

code: lib_dir (WX).

On Windows, the returned path uses "/" instead of "\", so just replace them.

Inside this directory is a directory called "examples". Start with the “simple” in these examples.

You should also check if wx is working correctly: use

WX :. Demo ()

in EShell.

+1
source

All Articles