Re: open_dll() with FreeBSD
- Posted by "C. K. Lester" <cklester at yahoo.com> Jan 13, 2003
- 481 views
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. :)