1. Finding DLL's
- Posted by irv Nov 17, 2019
- 1359 views
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?
2. Re: Finding DLL's
- Posted by ChrisB (moderator) Nov 18, 2019
- 1335 views
Ask the user where he/she put them.
3. Re: Finding DLL's
- Posted by Bhupen1277 Nov 18, 2019
- 1336 views
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?
4. Re: Finding DLL's
- Posted by irv Nov 18, 2019
- 1347 views
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?
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.
5. Re: Finding DLL's
- Posted by ChrisB (moderator) Nov 18, 2019
- 1316 views
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
6. Re: Finding DLL's
- Posted by ghaberek (admin) Nov 19, 2019
- 1285 views
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