Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Forth > Re: libffg2: gf...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 9 Topic 3683 of 4325
Post > Topic >>

Re: libffg2: gforth interface for g2 library

by Dennis Ruffer <druffer@[EMAIL PROTECTED] > Jan 7, 2008 at 04:05 PM

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
 




 9 Posts in Topic:
libffg2: gforth interface for g2 library
Robert Spykerman <robe  2008-01-06 23:11:14 
Re: libffg2: gforth interface for g2 library
Dennis Ruffer <druffer  2008-01-07 16:05:21 
Re: libffg2: gforth interface for g2 library
Coos Haak <chforth@[EM  2008-01-08 18:02:42 
Re: libffg2: gforth interface for g2 library
Dennis Ruffer <druffer  2008-01-09 16:58:41 
Re: libffg2: gforth interface for g2 library
Roelf Toxopeus <these3  2008-01-08 00:14:53 
Re: libffg2: gforth interface for g2 library
Robert Spykerman <robe  2008-01-07 18:45:19 
Re: libffg2: gforth interface for g2 library
astrobe <fdubois76@[EM  2008-01-09 09:24:41 
Re: libffg2: gforth interface for g2 library
Josh Grams <josh@[EMAI  2008-01-09 10:44:04 
Re: libffg2: gforth interface for g2 library
Robert Spykerman <robe  2008-01-09 22:28:28 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 14:33:12 CST 2008.