libturbojpeg.dll in gcc64 and turbojpeg.dll in vc64

31 views
Skip to first unread message

Lorenzo Pini

unread,
Mar 7, 2019, 9:53:27 AM3/7/19
to libjpeg-turbo User Discussion/Support
Hi all,
first of all I have to apologize if this is the expected behavior.

I noticed the released packages for windows have different DLL names between the gcc and the vc version.

libjpeg-turbo-2.0.2-gcc64.exe contains libturbojpeg.dll
libjpeg-turbo-2.0.2-vc64.exe contains turbojpeg.dll

I am loading the library from Java with System.loadLibrary("turbojpeg") and it works fine loading it under linux, while under windows only the "vc64" gets loaded.
In order to load the "gcc64" one under windows I have to rename the file to turbojpeg.dll

This difference goes back many releases, so I guess it is intended.
Is this difference expected?

Thank you

Regards
Lorenzo Pini

DRC

unread,
Mar 7, 2019, 11:29:11 AM3/7/19
to libjpeg-t...@googlegroups.com
Yes. MinGW automatically prefixes DLLs and import libraries with "lib",
in order to mimic Un*x library naming conventions. We've always just
rolled with that rather than trying to force the MinGW libraries to be
named the same as the Visual C++ libraries. If you use the
turbojpeg.jar file included with our MinGW packages, then it will
automatically load libturbojpeg.dll rather than turbojpeg.dll.

On 3/7/19 8:53 AM, Lorenzo Pini wrote:
> Hi all,
> first of all I have to apologize if this is the expected behavior.
>
> I noticed the released packages for windows have different DLL names
> between the gcc and the vc version.
>
> libjpeg-turbo-2.0.2-gcc64.exe contains libturbojpeg.dll
> libjpeg-turbo-2.0.2-vc64.exe contains turbojpeg.dll
>
> I am loading the library from Java withSystem.loadLibrary("turbojpeg")
Reply all
Reply to author
Forward
0 new messages