Building on OS X - a bit further on

Sean Hinde earlyriser@REDACTED
Thu Dec 6 16:48:23 CET 2001


Hi,

> If we just could get GS going without installing X we have a very
> nice Mac OS X port,

Well X is replaced by Carbon in the OS X port of TCL/TK..

The following procedure at least gets the thing to compile using the 
downloadable binary of TCL/TK for OS X

Build and make install with touch lib/gs/SKIP
remove gs/lib/SKIP

make again and allow to run until error (All you need is tcl2c which is 
not included with the TCL libs)

apply the patch (presumably) from:

http://www.erlang.org/ml-archive/erlang-questions/./200109/msg00059.html

cd lib/gs/c_src

./lib/tcl7.6/unix/tcl2c -o gstk.c gstk.tcl gstk_srv.tcl -tk

cc -o ../priv/bin/killer killer.c
cc -o ../priv/bin/wrap wrap.c
cc -o ../priv/bin/gstk gstk.c 
-I/Library/Frameworks/Tcl.framework/Headers 
-I/Library/Frameworks/Tcl.framework/PrivateHeaders -framework TCL 
-framework TK

run make install again (at least gets as far as installing ebin and src)

copy the priv dir from the src tree into the installed gs directory.

13>I=gs:start().
{1,<0.101.0>}
14> W=gs:window(I,[{title,"Ball"},{width,300},{height,300},{map,true}]).
{3,<0.101.0>}

I get a window (hurrah!) which doesn't respond to anything - it's a 
start :-)

If this ever works it might just be easiest to always look for 
preinstalled TCL/TK on the Mac - I'm not sure too many people will be 
using the Mac as an embedded target..

Also, there is no target for a static library at all in the mac Tk port 
(although there is for TCL)  - without a lot of work on Tk builds 
frameworks look to be the only way.

Sean




More information about the erlang-questions mailing list