pylibtiff icon indicating copy to clipboard operation
pylibtiff copied to clipboard

libtiff_ctypes: search first for libtiff.dll before libtiff3.dll

Open pieleric opened this issue 2 years ago • 0 comments

Some time ago, the GnuWin32 project provided Windows builds of libtiff, under the filename libtiff3.dll. The last version was 3.8.2, in 2006. The more recent versions of libtiff (v4+) are built as libtiff.dll.

Some customers were not able to run our application, although we ship the latest version of libtiff.dll with it. It turned out that they have an old 32-bit version of libtiff3.dll somewhere else on their system. This made LoadLibrary fail with such (confusing) error message: "Failed to load dynlib/dll 'C:\GTK\bin\libtiff3.dll'. Most probably this dynlib/dll was not found when the application was frozen."

=> Change the order of DLL search to first look for the recent version, and fallback to the ancient libtiff3.

pieleric avatar Sep 23 '22 07:09 pieleric