Thanks Jorge! Simple and complete and it even works. ;) DaR On 6/11/03 8:37 AM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> > > ----- Mensaje Original ----- > Remitente: Dennis Ruffer <[EMAIL PROTECTED]> > Fecha: Domingo, Junio 8, 2003 7:20 pm > Asunto: Re: [gforth] dylib vs. open-lib > >> Jorge, >> >> Do you, maybe, have a simple example of calling a dylib that I >> could use as >> a starting point? I'm having a hard time getting my head around >> how this >> works, and I don't even know if I have the gforth side setup >> correctly yet. >> I have both a fink setup (0.5.0-2) and my own (0.6.1). > > Try this: > > \ load library support > require lib.fs > > \ create the word-defining word libc > library libc /usr/lib/libc.dylib > > \ sleep() is called _sleep in libc.dylib > \ takes 1 argument and returns an int > 1 (int) libc sleep _sleep > > \ testing > 10 sleep . > > I guess the best reference is /sw/share/gforth/0.5.0/lib.fs > > Tell me if you have any problem. Greetings, > Jorge > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
