On 2008-01-07 00:11:14 -0700, Robert Spykerman
<robert.spykerman@[EMAIL PROTECTED]
> said:
> For that matter if there are any good examples on how to extend
> gforth, call c, or cobble a GUI onto it under linux. Cheers
Robert,
There are many examples of calling external libraries from gforth, a
few even in the distribution itself. Look at the Unix subdirectory for
time.fs and see if you can load that. You may have to also load the
lib.fs sup****t and you may need to point it to the correct library on
your system.
Here's some simple code that works on OSX:
[IFUNDEF] library require lib.fs [THEN]
library libc /usr/lib/libc.dylib
1 (int) libc sleep sleep
10 sleep . cr
The GUI side of your question gets to be a little more complex. There
used to be an example from Jorge Acereda Maci·
<jacereda@[EMAIL PROTECTED]
> that implemented a GLUT interface in
gforth, but I can't find it at the moment. Perhaps Jorge is listening
or maybe Anton knows where it is. I tried doing some cross platform
stuff in OpenGL a while ago, but ran into issues with SwiftForth that I
couldn't resolve. I don't have Linux setup, but I do have a pretty
good handle on the gforth calls in OSX. I could come up with some
example code if you don't find anything else.
DaR


|