1. Can't open dll's

Is there a limit to the number of dll's that Euphoria can open through
open_dll()?
The following code:

atom user32, gdi32, kernel32, mmsystem
    user32 = open_dll("user32.dll")
    if user32 = NULL then
        not_found("user32.dll")
    end if
    gdi32 = open_dll("gdi32.dll")
    if gdi32 = NULL then
        not_found("gdi32.dll")
    end if
    shell32 = open_dll("shell32.dll")
    if shell32 = NULL then
        not_found("shell32.dll")
    end if
    kernel32 = open_dll("kernel32.dll")
    if kernel32 = NULL then
        not_found("kernel32.dll")
    end if
    mmsystem = open_dll("mmsystem.dll")
    if mmsystem = NULL then
        not_found("mmsystem.dll")
    end if
Will always report:
    Could not find mmsystem.dll.
Even if I explicitely specify open_dll("C:\\Windows\\System\\Mmsystem.dll")
Euphoria reports that the file is not found (ie. mmsystem = NULL)

Does anyone know what's going on, or a way around this?  Any ideas would be
appreciated.

Thanks,
James Powell
(btw, mmsystem.dll IS in my windows\system dir, just like kernel32, user32,
etc.)

new topic     » topic index » view message » categorize

2. Re: Can't open dll's

hrm... 1st to reply to my own message.  oh well :)

I made a mistake.  Euphoria was reporting that it could not "open" the dll,
not that it
couldn't be found.  I realised that mmsystem.dll is a 16 bit dll, rather than
a 32 bit dll.
Since Euphoria is a 32 bit language it cannot use 16 bit dll's (duh! :).
Once I did a little looking in Windows\System, and a little bit of editing, I
found that:
    mmsystem = open_dll("winmm.dll")
works perfectly :)

Thanks to any who have already attempted to solve my earlier post, and my
apoligies for not thinking this through for a bit longer.

James Powell

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

3. Re: Can't open dll's

[Mr. Mullins asked me to forward this message to the list]

Hi Travis:

After much investigation, I found out that all the *.so files
which Euphoria couldn't load - about 140 out of 300 -
have "undefined symbols" in them: I found this out
by running ldd -d on them:

irv@blecch irv]$ ldd -d /usr/lib/libgtk.so
......
undefined symbol: gdk_root_window       (/usr/lib/libgtk.so)
undefined symbol: gdk_threads_mutex     (/usr/lib/libgtk.so)
undefined symbol: gdk_display   (/usr/lib/libgtk.so)
undefined symbol: gdk_font_equal        (/usr/lib/libgtk.so)
undefined symbol: gdk_selection_property        (/usr/lib/libgtk.so)
undefined symbol: gdk_progclass (/usr/lib/libgtk.so)
undefined symbol: gdk_root_parent       (/usr/lib/libgtk.so)

All the library files which Euphoria *can* load do not
show any undefined symbols.

I'm using a newly loaded Mandrake distribution, so there's
no chance that I have damaged any files. And I can write
and compile C programs which use libgtk.so without problem.
It's looking more an more like a Euphoria problem.

Please forward this to the Euforum for me, our mail server
is dead (again - that makes three days in a row).

Regards,
Irv

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

4. Re: Can't open dll's

>After much investigation, I found out that all the *.so files
>which Euphoria couldn't load - about 140 out of 300 -
>have "undefined symbols" in them: I found this out
>by running ldd -d on them:


I got some "unresolved symbols" errors when trying to load glut.so (or  some 
related lib). This led me to drop my plans on a linux version of my 
glut-wrapper.. *sigh*

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

5. Re: Can't open dll's

Irv Mullins writes:
> After much investigation, I found out that all the *.so files
> which Euphoria couldn't load - about 140 out of 300 -
> have "undefined symbols" in them: I found this out
> by running ldd -d on them:

I tried a few experiments, and it looks like
you can probably open most of these,
provided:

   1. I add the RTLD_GLOBAL flag when I call C's dlopen()
       on Linux. I can do this for the next release. If you can't wait,
       you can read the Linux man page for dlopen() and try to wrap
       the dlopen() function yourself. You should call it as:
       lib = dlopen(dll_name, RTLD_LAZY | RTLD_GLOBAL);

       RTLD_GLOBAL makes symbols from one .so available to
       subsequently-loaded .so's.

   2. You would have to manually pre-open any .so's that the main .so 
       requires that aren't opened automatically.

Regards,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

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

6. Re: Can't open dll's

Bernie Ryan writes:
> If you look at the message 
> Date: Sat, 2 Dec 2000 19:31:26 -0500

If you are still having problems,
please quote your message and my reply 
and we'll take it from there.

Regards,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

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

Search



Quick Links

User menu

Not signed in.

Misc Menu