Re: open_dll() with FreeBSD

new topic     » goto parent     » topic index » view thread      » older message » newer message

On Sunday 12 January 2003 08:22 pm, you wrote:
>
> include dll.e
> include machine.e
>
> atom lib
> lib =3D open_dll("libc.so")
> if lib =3D 0 then
>     puts(1, "where is libc.so?\n")
> end if
>
> integer r
> r =3D define_c_proc(lib, "printf", {C_POINTER})
> if r =3D -1 then
>     puts(1, "couldn't find printf!\n")
> else
>     printf(1, "r is %d\n", r)
> end if
>
> c_proc(r, {allocate_string("C.K.")})

The above code outputs the following:

-- start output, but doesn't include this line
r is 0
C.K.
-- end output, not including this line

That looks like a success to me, but please feel free to comment. :)

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu