1. callc.exu in Linux demo section of Euphoria for Linux

Hi all,
    Correct me if I am wrong about this but...

I had tried to run callc.exu and had seen an error running it directly.
So I ran it as such:
exu callc.exu
and 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?
Monty in Oregon
PS here is the corrected code:

-- Standard C Library
libc = open_dll("")
-- Standard Math Library
libm = open_dll("")

new topic     » topic index » view message » categorize

2. callc.exu in Linux demo section of Euphoria for Linux

Hi all,
Please forgive me if you have received this already.  I never recieved a
copy of it, although the listserve eventually sent me something saying it
had been distributed.  Usually I get the message and the receipt:


    Correct me if I am wrong about this but...

I had tried to run callc.exu and had seen an error running it directly.
So I ran it as such:
exu callc.exu
and 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?
Monty in Oregon
PS here is the "corrected" code:

-- Standard C Library
libc = open_dll("")
-- Standard Math Library
libm = open_dll("")

new topic     » goto parent     » topic index » view message » categorize

3. 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/

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu