1. open_dll() with FreeBSD
- Posted by "C. K. Lester" <cklester at yahoo.com> Jan 12, 2003
- 483 views
RobC, Can you use open_dll() with FreeBSD? Our testing seems to say no at this=20 point... Actually, now that I mention it, I saw something in the docs about that..= =2E
2. Re: open_dll() with FreeBSD
- Posted by Robert Craig <rds at RapidEuphoria.com> Jan 12, 2003
- 445 views
C.K. Lester writes: > Can you use open_dll() with FreeBSD? Yes. Remember to include dll.e from euphoria/include. Also, Linux/FreeBSD/Unix systems are not as standardized as Windows. Some shared libraries (.so files) may be in different places on the system, and might not be found by a demo program. Also, the current directory is NOT automatically on the search path, like it is in DOS/Windows, so you'll have to say: ./myprogram to run a program in the current directory (unless that directory happens to be on the PATH). Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
3. Re: open_dll() with FreeBSD
- Posted by jbrown1050 at hotpop.com Jan 12, 2003
- 438 views
On Sun, Jan 12, 2003 at 04:26:04PM -0500, Robert Craig wrote: > > C.K. Lester writes: > > Can you use open_dll() with FreeBSD? > > Yes. > Remember to include dll.e from euphoria/include. > Also, Linux/FreeBSD/Unix systems are not as standardized as Windows. > Some shared libraries (.so files) may be in > different places on the system, and might not be found by > a demo program. > > Also, the current directory is NOT automatically on the > search path, like it is in DOS/Windows, so you'll have to > say: > ./myprogram > to run a program in the current directory (unless that > directory happens to be on the PATH). > > Regards, > Rob Craig > Rapid Deployment Software > http://www.RapidEuphoria.com > Does open_dll("") work? According to ck, the answer seems to be no??? What libarires is the Linux version of exu linked to, and what libraries is the FreeBSD version linked to? -jbrown > > > TOPICA - Start your own email discussion group. FREE! -- /"\ ASCII ribbon \ / campain against X HTML e-mail and /*\ news and unneeded MIME
4. Re: open_dll() with FreeBSD
- Posted by "C. K. Lester" <cklester at yahoo.com> Jan 13, 2003
- 450 views
On Sunday 12 January 2003 03:26 pm, you wrote: > > C.K. Lester writes: > > Can you use open_dll() with FreeBSD? > > Yes. > Remember to include dll.e from euphoria/include. Oh, that's pathetic. I wasn't including it. I should be tortured. Maybe I thought it was a built-in...
5. Re: open_dll() with FreeBSD
- Posted by "C. K. Lester" <cklester at yahoo.com> Jan 13, 2003
- 484 views
This ain't workin': -- Start Non-Functioning Code include dll.e constant prn =3D define_c_proc(open_dll(""), "printf", {C_INT}) c_proc(prn, {1}) -- End Non-Functioning Code I get this: -- result of running above code /home/cklester/Desktop/killme.exu:4 c_proc/c_func: bad routine number (-1) --> see ex.err -- end of result What's goin' on?
6. Re: open_dll() with FreeBSD
- Posted by Robert Craig <rds at RapidEuphoria.com> Jan 13, 2003
- 461 views
C.K. Lester writes: > This ain't workin': Try this: include dll.e include machine.e atom lib lib = open_dll("libc.so") if lib = 0 then puts(1, "where is libc.so?\n") end if integer r r = define_c_proc(lib, "printf", {C_POINTER}) if r = -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.")}) Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
7. Re: open_dll() with FreeBSD
- Posted by "C. K. Lester" <cklester at yahoo.com> Jan 13, 2003
- 482 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. :)
8. Re: open_dll() with FreeBSD
- Posted by jbrown1050 at hotpop.com Jan 13, 2003
- 466 views
On Mon, Jan 13, 2003 at 12:49:24PM +1100, Patrick.Barnes at transgrid.com.au wrote: > > Welll.... > > Obviously the define_c_proc is returning a -1..... > > perhaps the open_dll("") call is incorrect? open_dll("") works fine on Linux. Try this: include dll.e ? open_dll("") What does that do ck? -jbrown > > -----Original Message----- > From: C. K. Lester [mailto:cklester at yahoo.com] > Sent: Monday, 13 January 2003 12:53 > To: EUforum > Subject: Re: open_dll() with FreeBSD > > > This ain't workin': > > -- Start Non-Functioning Code > include dll.e > > constant prn = define_c_proc(open_dll(""), "printf", {C_INT}) > c_proc(prn, {1}) > -- End Non-Functioning Code > > I get this: > > -- result of running above code > /home/cklester/Desktop/killme.exu:4 > c_proc/c_func: bad routine number (-1) > --> see ex.err > > -- end of result > > What's goin' on? > > ==^^=============================================================== > This email was sent to: Patrick.Barnes at transgrid.com.au > > > TOPICA - Start your own email discussion group. FREE! > > > *********************************************************************** > > > *********************************************************************** > > > > TOPICA - Start your own email discussion group. FREE! -- /"\ ASCII ribbon \ / campain against X HTML e-mail and /*\ news and unneeded MIME
9. Re: open_dll() with FreeBSD
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Jan 13, 2003
- 438 views
On Sun, 12 Jan 2003 19:53:28 -0600, "C. K. Lester" <cklester at yahoo.com> wrote: >c_proc/c_func: bad routine number (-1) Try using a real library from /usr/lib, eg libgtk.so Run "nm" on it to find a symbol which is definitely defined. Try it with a full path and not, and when running as root. There was a problem in earlier versions of Eu which meant that if you ran ldd -l libgtk.so and it returned any undefined symbols it wouldn't load, but according to the message archive that has been fixed. However it cannot hurt to rule that out. HTH, Pete
10. Re: open_dll() with FreeBSD
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Jan 13, 2003
- 439 views
On Sun, 12 Jan 2003 20:43:33 -0600, "C. K. Lester" <cklester at yahoo.com> wrote: >That looks like a success to me, but please feel free to comment. :) Yes, looks like success to me too.=20 Please ignore my previous post. I would *guess* then your problem is with ld.so Have a look at man ldconfig. Pete
11. Re: open_dll() with FreeBSD
- Posted by jbrown1050 at hotpop.com Jan 13, 2003
- 475 views
On Sun, Jan 12, 2003 at 09:22:34PM -0500, Robert Craig wrote: > > C.K. Lester writes: > > This ain't workin': > > Try this: > <snip> > lib = open_dll("libc.so") > if lib = 0 then > puts(1, "where is libc.so?\n") > end if <snip> > > > Regards, > Rob Craig > Rapid Deployment Software > http://www.RapidEuphoria.com > Interesting ... you used the string "libc.so" rather than just the empty "", apparently FreeBSD's dl_open() doesnt default to all dynamicly-loaded/shared libs as well as the executable itself as GNU under Linux does. Heh. jbrown > > > TOPICA - Start your own email discussion group. FREE! -- /"\ ASCII ribbon \ / campain against X HTML e-mail and /*\ news and unneeded MIME