1. Finding DLL's

What is the best cross-platform way for a program to find the location of a specified dll? Or a dll from a list of possible dll's?

new topic     » topic index » view message » categorize

2. Re: Finding DLL's

Ask the user where he/she put them.

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

3. Re: Finding DLL's

irv said...

What is the best cross-platform way for a program to find the location of a specified dll? Or a dll from a list of possible dll's?

https://www.dlldump.com/

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

4. Re: Finding DLL's

Bhupen1277 said...
irv said...

What is the best cross-platform way for a program to find the location of a specified dll? Or a dll from a list of possible dll's?

https://www.dlldump.com/

Let me rephrase the question:

What is the best cross-platform way for a program to find the location of a specified dll? Or a dll from a list of possible dll's?

By program, I mean a Euphoria program, otherwise I would ask this on a python forum. And by location, I mean on the computer where the program is run.

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

5. Re: Finding DLL's

Hi

And I literally meant ask the user. First look in the usual culprits, and then if the program still can't find it, inform the user, and politely ask where he/she might have put it, or have they got it (or the right version) installed at all.

You could do a search the entire hard drive - where on DOS / windows, whereis on linux, parse the results, and if it's found nothing, ask the user.

Cheers

Chris

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

6. Re: Finding DLL's

irv said...

What is the best cross-platform way for a program to find the location of a specified dll? Or a dll from a list of possible dll's?

By program, I mean a Euphoria program, otherwise I would ask this on a python forum. And by location, I mean on the computer where the program is run.

The best cross-platform method? Don't. Just ask open_dll() for a library and leave it at that. If it fails, it fails.

The "proper" location for shared libraries is entirely platform-dependent.

Windows

  • Application-specific libraries should be stored next to the executable in the Program Files directory. e.g. C:\Program Files\My Application
  • Framework-specific libraries should be stored in that framework's installation directory. e.g. C:\Euphoria\bin or C:\Windows\Microsoft.NET
  • System-wide libraries should be stored in the Windows system directory. e.g. C:\Windows\System32

Linux/BSD

  • This is highly configurable and can change from distro to distro.
  • Default search paths are (usually) /lib, /usr/lib, /usr/local/lib.
  • Paths can be specified by LD_LIBRARY_PATH environment variable, or the executable's own rpath value.

OS X

  • Mostly the same as Linux/BSD but also searches ~/lib by default.
  • Application-specific libraries should be included in the application's own bundle.
  • Also uses environment variables DYLD_LIBRARY_PATH and DYLD_FALLBACK_LIBRARY_PATH.

None of this prevents applications from behaving badly and putting things in strange locations and then opening them dynamically via full path.

What problem are you trying to solve by manually looking for libraries?

-Greg

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

Search



Quick Links

User menu

Not signed in.

Misc Menu