GTK4 DLLs from Linux

I managed to build the DLLs for GTK4 as follows.
Built with Linux Mint 64bit via cross compiler.
But all DLLs are structured as follows: libxxx.dll, shouldn’t they be xxx.dll?
It doesn’t matter whether it’s glib, pango, cairo, etc.
If so, what do I have to change when building the DLLs?

build:

mkdir gtk
cd gtk
git clone https://gitlab.gnome.org/GNOME/gtk.git
mkdir build_win64
cd build_win64
meson ../gtk/ --cross-file ../cross.ini
ninja -j20

cross,ini

[host_machine]
system = 'windows'
cpu_family = 'x86_64'
cpu = 'x86_64'
endian = 'little'

[properties]
c_args = []
c_link_args = []
# c_link_args = ['-lsynchronization']
sys_root = '$HOME/.wine/drive_c'
# sys_root = '/path/to/your/windows/sysroot'

[binaries]
c = 'x86_64-w64-mingw32-gcc'
cpp = 'x86_64-w64-mingw32-g++'
ar = 'x86_64-w64-mingw32-ar'
ld = 'x86_64-w64-mingw32-ld'
objcopy = 'x86_64-w64-mingw32-objcopy'
strip = 'x86_64-w64-mingw32-strip'
pkgconfig = 'x86_64-w64-mingw32-pkg-config'
windres = 'x86_64-w64-mingw32-windres'

# exe_wrapper = 'wine64'
exe_wrapper = 'wine'

[built-in options]
vulkan = 'disabled'
default_library = 'shared'
build-demos = 'false'

Hi,

I see libxxx.dll on my Windows installation, so I suppose it’s correct.

Do you have any issue with xxx.dll?

1 Like

That’s the default used by Meson with non-MSVC compilers, see the reference documentation: Functions

The convention of using the libfoo.dll naming scheme with GCC predates Meson, however. I think that’s done for consistency, as GCC prepends “lib” when it encounters -lfoo.

See also Fix filenames and paths used in DLL shared library generation by nirbheek · Pull Request #417 · mesonbuild/meson · GitHub

2 Likes

Thanks for the info, now I understand why there is a libxxx everywhere.

Apparently you could change it in meson, but I’ll leave it.

Somehow it didn’t work.

But when I tried it again, everything worked.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.