speak, it ain’t illegal yet

October 21, 2006

How to compile wxErlang on Linux

Filed under: erlang — diginux @ 7:34 am

wxErlang is an interface for Erlang to the popular wxWidgets GUI library. Combining Erlang and wxWidgets creates an unbeatable combination for GUI writing. First of all we inherit the power of having a true concurrent functional programming with Erlang and add to that the fact that we can write a program once but have it use the native GUI for Linux, MacOSX, Windows, etc. This means if you execute the program in Linux, you will get a nice Gnome look, if you execute in MacOSX, you will net the nice Mac look, all with one single program.

wxErlang is still in an early version, but alot of documentation is provided how to use it, the only trouble one might face is actually compiling the thing.

Before you compile, make sure to have the following programs installed on your computer:
1. Erlang
2. wxGTK
3. Doxygen

Now download wxErlang and let’s start.

1. tar zxvf wxe-*.tar.gz
2. cd wxe
3. Edit config.mk and change the following values:
a. PLATFORM=MACOSX
b. ERLI_VSN=`echo /usr/lib/erlang/lib/erl_interface-* | awk ‘BEGIN{ FS=”erl_interface-” } { print $2 }’`
c. WXCONFIG=`which wx-config`
4. cd gen
5. make xml
6. cd ..
7. make

Now if that worked, you should be able to try the example program:
1. cd etop
2. make
3. erl -pa ../ebin -run erltop start

If that worked, congratulations! You are now well on your way to learning more and writing some real applications.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.