You may still have weird behaviors if there’s another application installed, another python, or another set of libraries somewhere on the system. Also, the solution may involve two different strategies for developers and users (deployed version) Developersįor developers, keep relying on %PATH% for lookup, and point this to the external-libs/build/lib. We also don’t want system libraries to take over or influence our installation.Ī temporary solution has been devised, but requires care. Which means that we need to put all stuff in the right place. Excluding the system directories and magic registry tricks, we are left only with the first option. We want to make the last entry irrelevant, that is, we don’t want to depend on the path for library lookup. linkage) and with dynamic opening (“dlopen” like) which is extensively used by python to load “pyd” files (basically, compiled python modules). To add to the confusion, we need to deal with both regular dependencies (e.g. If exe depends on a library dll1 which in turn depends on another library dll2, the “executable module” will be dll1. The directories listed in the PATH environment variable.Īn important thing to note is that “executable module” is not necessarily the running exe.The GetWindowsDirectory function retrieves the path of this directory. The GetSystemDirectory function retrieves the path of this directory. The directory where the executable module for the current process is located.What says is the following order, in the most simplified approach: Windows has a weird lookup strategy for dlls, and it depends on flags and other circumstances. Using the path doesn’t solve the problem that some users encounter, that is, if they have a library in the System32 directory that happens to have the same name, it will override ours and generate strange errors.If two or more versions of an application are installed, one of the two will end up using the libraries of the other, with horrible consequences, depending on which come first in the PATH specification.on User’s machines, it can lead to problems. The PATH variable on windows is extremely limited (260 chars) and it runs out fast. In the past, we relied on PATH for this, but this is going away, for the following reasons: On windows, we want applications to be able to start without the need for a path specification, yet we need our DLLs to be found.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |