Re: callc.exu in Linux demo section of Euphoria for Linux
Monty writes:
> the program runs correctly every time ...even if you
> change these lines:
> -- Standard C Library
> libc = open_dll("/usr/lib/libc.so")
> -- Standard Math Library
> libm = open_dll("/usr/lib/libm.so")
> I thought hey the path is wrong.
> So I changed it ... a few times. Finally I found out it didn't really
> matter what I put between the quotes, so I tried putting nothing.
> AND IT STILL WORKS
> What is this? Was wondering if this was an interesting
> bug/feature?
I tried this on my machine and got the same result.
After checking the Linux "man" pages, I've gathered that
if the library name you ask for is not found, i.e. you get 0
returned from open_dll(), define_c_proc/func will
automatically search through the libraries that have been
linked already by exu itself, in order to find the C routine.
exu links dynamically with libc and libm.
This is an interesting "feature". I guess I'll leave it in,
but you should add code to check for a 0
result from open_dll() if you need to know if it really
located your library or not.
Regards,
Rob Craig
Rapid Deployment Software
http://members.aol.com/FilesEu/
|
Not Categorized, Please Help
|
|