From: Keith M. <kei...@to...> - 2004-09-30 12:12:17
|
Erik de Castro Lopo wrote: >> IMO, this is the best approach. If you are using MSYS, then a good >> place for any command line apps you want to install would be >> /usr/local/bin (or /local/bin, which is the same place, due to the >> way MSYS 'mounts' /usr). When these apps need DLLs, for their use >> only, then put these in /usr/local/bin too. Set your PATH up so that >> /usr/local/bin is searched, in whatever order you prefer, and not only >> will the shell be able to find your apps, but those apps will also >> find their DLLs. > > Well /usr/local/bin already works for the apps if I put the DLL > in the windows system directory, but now I think I should put > the DLL in /usr/local/bin. That would be my choice. >> IMO, this is not as clean as simply keeping the DLLs and apps >> together, in a common bin directory on the path -- /usr/local/bin is, >> after all, provided for users' locally installed apps, so would seem >> to fit the bill nicely. Requiring the user to type >> >> PATH="$PATH:path/to/myDLLs" myapp ... > > Would it be possible to add /usr/local/lib to the PATH variable > and have that work? That tends to make a little more sense. Any directory in the PATH should do. Normally, Windows will put its own system directory in PATH, which is why your use of %SYSTEMROOT%/System32 would have worked, in your original setup. Adding /usr/local/lib to the PATH, and putting the DLLs there would also work, *but* it is rather unconventional -- this directory is normally used for libraries to be *statically* linked to your apps, and is not normally included in PATH. On Linux, it may also contain .so libraries, (the Linux equivalent of DLLs), but then Linux has a different mechanism for locating them, which is independent of any PATH search. HTH. Keith. |