We're hiring!
*

Build and run GTK 4 applications with Visual Studio

Xavier Claessens avatar

Xavier Claessens
March 18, 2021

Share this post:

Reading time:

Over the past few months, I've been working on a side project to improve Meson sub-project support. The best stress test is to build projects on Windows, without msys2, because it has no dependencies or tools installed (e.g. pkg-config). Meson has to build everything itself from scratch.

Here are step-by-step instructions, starting from a fresh Windows 10 installation, on how to run a gtk4-demo application.

Install Visual Studio

Download from https://visualstudio.microsoft.com/vs/community. Make sure to check the box "Desktop development with C++".

Collabora - Installing Visual Studio

Install Python >= 3.6

Download from https://www.python.org/downloads. Make sure to check the box "Add python to PATH".

Collabora - Installing Python

Install Git for Windows

Download from https://gitforwindows.org. It asks many questions, however the default is always good enough, so next, next, next...

Collabora - Installing Git for Windows

Open developer terminal

From the Windows start menu, search for x64 Native Tools Command Prompt for VS 2019. That will open a terminal configured to use MSVC x64 tools.

Collabora - Visual Studio Developer Command Prompt

First let's create a directory where we'll fetch the source code:

mkdir C:\src
cd C:\src

Let's also configure git:

git config --global user.email "xavier.claessens@collabora.com"
git config --global user.name "Xavier Claessens"

Install Meson

Installing the latest release of Meson (requires >=0.57.0) can be done with a simple command:

C:\src>pip install meson

Fetch GTK4 source

Fetch gtk from git:

C:\src>git clone https://gitlab.gnome.org/GNOME/gtk.git
C:\src>cd gtk

At the time of writing !3135 is not yet merged, so we need to use my branch:

(Update March 22: This has now been merged so my branch is no longer needed.)

C:\src\gtk>git fetch https://gitlab.gnome.org/xclaesse/gtk.git meson-install-script
C:\src\gtk>git checkout -b meson-install-script FETCH_HEAD

Build GTK4 with all its dependencies

During the GTK4 configuration, Meson will download and configure all dependencies. Great efforts have been made across all dependencies to make them work out of the box on Windows.

C:\src\gtk>meson setup build --prefix C:/gnome
C:\src\gtk>meson compile -C build
C:\src\gtk>meson install -C build

Collabora - GTK4 configuration

Run gtk4-demo

That's all, you can now run demo applications!

C:\src\gtk>C:\gnome\bin\gtk4-demo.exe

Collabora - Running gtk4-demo.exe

It works out of the box on my VirtualBox machine, however on my physical PC with an intel GPU, I get a crash at startup:

Unhandled exception at 0x5211345E (ig4icd32.dll) in gtk4-demo.exe: 0xC0000005: Access violation reading location 0x00000050

This can be worked around by using cairo rendering:

C:\src\gtk>set GSK_RENDERER=cairo
C:\src\gtk>C:\gnome\bin\gtk4-demo.exe

Debug in Visual Studio

Since this is a complete build using MSVC, it is also fully debuggable.

  • Open Visual Studio
  • Click "Open a project or solution"
  • Browse to C:\gnome\bin\gtk4-demo.exe
  • Click "Start" button

If you break execution, or hit a crash, it will open the source code and you can debug step by step, see the value of any variable, whether it is in gtk or in any of its dependencies.

Debugging in Visual Studio.

What's next?

Here's a list of some of the items I would like to eventually look into:

  • See if we can use GTK4 as sub-project of a real application. Which applications do we have that are ported to GTK4 already and runs on Windows? Gedit?
  • Add GStreamer gst-build as a sub-project of GTK4 to build the media player? This would probably lead to a world record of number of Meson subprojects built at once.
  • Add Windows CI to GTK4?

As usual, if you have any questions about GTK4 or GStreamer on Windows, or any other platform, please contact us!

Comments (29)

  1. Lindomar:
    Mar 19, 2021 at 07:23 PM

    Is it possible to use GTK4 in Python 3.9 on Windows?

    Reply to this comment

    Reply to this comment

    1. Xavier Claessens:
      Mar 22, 2021 at 12:38 PM

      With this tutorial it is not building gobject-introspection bindings. It should be possible to add g-i as a subproject and set GI_TYPELIB_PATH but I haven't tried it yet.

      Reply to this comment

      Reply to this comment

  2. Christian Ohrfandl:
    Mar 20, 2021 at 12:12 AM

    Hi,

    thank you for the tutorial!

    However, I face the following issues when running the command "meson compile -C build" (multiple times):

    FAILED: subprojects/freetype2/freetype-6.dll.p/src_gzip_ftgzip.c.obj
    "cl" "-Isubprojects\freetype2\freetype-6.dll.p" "-Isubprojects\freetype2" "-I..\subprojects\freetype2" "-I..\subprojects\freetype2\include" "-IC:/dev/StrawberryPerl/c/lib/pkgconfig/../../include/libpng16" "/MD" "/nologo" "/showIncludes" "/W2" "/O2" "/Zi" "-DFT2_BUILD_LIBRARY" "-DFT_CONFIG_CONFIG_H=" "-DFT_CONFIG_OPTIONS_H=" "-DDLL_EXPORT" "-D_CRT_SECURE_NO_WARNINGS" "-D_CRT_NONSTDC_NO_WARNINGS" "/Fdsubprojects\freetype2\freetype-6.dll.p\src_gzip_ftgzip.c.pdb" /Fosubprojects/freetype2/freetype-6.dll.p/src_gzip_ftgzip.c.obj "/c" ../subprojects/freetype2/src/gzip/ftgzip.c
    ../subprojects/freetype2/src/gzip/ftgzip.c(46): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "zlib.h": No such file or directory
    [93/3580] Compiling C object subprojects/freetype2/freetype-6.dll.p/src_psaux_psaux.c.obj
    ninja: build stopped: subcommand failed.

    FAILED: subprojects/freetype2/freetype-6.dll.p/src_gzip_ftgzip.c.obj
    "cl" "-Isubprojects\freetype2\freetype-6.dll.p" "-Isubprojects\freetype2" "-I..\subprojects\freetype2" "-I..\subprojects\freetype2\include" "-IC:/dev/StrawberryPerl/c/lib/pkgconfig/../../include/libpng16" "/MD" "/nologo" "/showIncludes" "/W2" "/O2" "/Zi" "-DFT2_BUILD_LIBRARY" "-DFT_CONFIG_CONFIG_H=" "-DFT_CONFIG_OPTIONS_H=" "-DDLL_EXPORT" "-D_CRT_SECURE_NO_WARNINGS" "-D_CRT_NONSTDC_NO_WARNINGS" "/Fdsubprojects\freetype2\freetype-6.dll.p\src_gzip_ftgzip.c.pdb" /Fosubprojects/freetype2/freetype-6.dll.p/src_gzip_ftgzip.c.obj "/c" ../subprojects/freetype2/src/gzip/ftgzip.c
    ../subprojects/freetype2/src/gzip/ftgzip.c(46): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "zlib.h": No such file or directory

    FAILED: subprojects/glib/gobject/gobject-2.0-0.dll.p/gclosure.c.obj
    "cl" "-Isubprojects\glib\gobject\gobject-2.0-0.dll.p" "-Isubprojects\glib\gobject" "-I..\subprojects\glib\gobject" "-Isubprojects\glib" "-I..\subprojects\glib" "-Isubprojects\glib\glib" "-I..\subprojects\glib\glib" "-Isubprojects\proxy-libintl" "-I..\subprojects\proxy-libintl" "/MD" "/nologo" "/showIncludes" "/W2" "/O2" "/Zi" "/wd4035" "/wd4715" "/wd4116" "/wd4046" "/wd4068" "/wo4090" "/FImsvc_recommended_pragmas.h" "/utf-8" "-D_GNU_SOURCE" "-DG_ENABLE_DEBUG" "-DG_LOG_DOMAIN=\"GLib-GObject\"" "-DGOBJECT_COMPILATION" "/Fdsubprojects\glib\gobject\gobject-2.0-0.dll.p\gclosure.c.pdb" /Fosubprojects/glib/gobject/gobject-2.0-0.dll.p/gclosure.c.obj "/c" ../subprojects/glib/gobject/gclosure.c
    ../subprojects/glib/gobject/gclosure.c(28): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "ffi.h": No such file or directory

    It is interesting though, e.g. zlib.h is located in the place where it should reside. However, ffi.h is not there...

    Anyway, here you can find the whole log from compilation: https://pastebin.com/T0QRUZya

    Do you have any suggestions?

    Cheers,
    Christian

    Reply to this comment

    Reply to this comment

    1. LINDOMAR BEGA:
      Mar 20, 2021 at 01:00 AM

      The tutorial works perfectly, but no commands can be left. I had a problem compiling twice and since I was not an expert I remade everything.

      Reply to this comment

      Reply to this comment

    2. Xavier Claessens:
      Mar 22, 2021 at 12:43 PM

      Check your logs to see if it has setup zlib subproject, or if it found it on your system somewhere. Could you attach your /meson-logs/meson-logs.txt for more info, please?

      Reply to this comment

      Reply to this comment

      1. Frank:
        Jun 23, 2021 at 10:29 AM

        Hello and thanks for your very helpfull tutorial!

        I've got an equal issue with subprojects/glib/gobject/gobject-2.0-0.dll.p:
        ../subprojects/glib/gobject/gclosure.c(28): fatal error C1083: Datei (Include) kann nicht geöffnet werden: "ffi.h"

        Maybe its a conflict with pkg-config:

        Run-time dependency libffi found: YES 3.3-rc0
        Pkg-config binary for MachineChoice.HOST is cached.
        Determining dependency 'zlib' with pkg-config executable 'N:\\prog\\Perl64\\perl\\bin\\pkg-config.BAT'
        env[PKG_CONFIG_PATH]:
        Called `N:\prog\Perl64\perl\bin\pkg-config.BAT --modversion zlib` -> 0
        1.2.11
        env[PKG_CONFIG_PATH]:
        Called `N:\prog\Perl64\perl\bin\pkg-config.BAT --cflags zlib` -> 0

        env[PKG_CONFIG_ALLOW_SYSTEM_LIBS]: 1
        env[PKG_CONFIG_PATH]:
        Called `N:\prog\Perl64\perl\bin\pkg-config.BAT --libs zlib` -> 0
        -LN:/prog/Perl64/c/lib/pkgconfig/../../lib -lz
        env[PKG_CONFIG_PATH]:
        Called `N:\prog\Perl64\perl\bin\pkg-config.BAT --libs zlib` -> 0
        -lz
        Run-time dependency zlib found: YES 1.2.11
        Running compile:
        Working directory: N:\data\src\build\meson-private\tmpgj8j6uyd
        Command line: cl N:\data\src\build\meson-private\tmpgj8j6uyd\testfile.c /FeF:\Daten\gtk4\src\gtk\build\meson-private\tmpgj8j6uyd\output.exe /nologo /showIncludes /MD /nologo /showIncludes /Od kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib

        Reply to this comment

        Reply to this comment

  3. Giulio:
    Jun 28, 2021 at 09:43 AM

    Below you find the procedure to install GTK4 on Windows via MSYS2 without building it from source.

    https://stackoverflow.com/a/68150140/11323942

    Reply to this comment

    Reply to this comment

  4. John Nagle:
    Jul 17, 2021 at 05:48 AM

    Hi...during "meson compile -C build" it fails out with:

    FAILED: subprojects/libjpeg-turbo-2.1.0/jpeg-8.2.2.dll subprojects/libjpeg-turbo-2.1.0/jpeg-8.2.2.pdb
    "link" @subprojects/libjpeg-turbo-2.1.0/jpeg-8.2.2.dll.rsp
    Creating library subprojects\libjpeg-turbo-2.1.0\jpeg.lib and object subprojects\libjpeg-turbo-2.1.0\jpeg.exp
    jcphuff.c.obj : error LNK2019: unresolved external symbol ___builtin_ctzl referenced in function _count_zeroes
    subprojects\libjpeg-turbo-2.1.0\jpeg-8.2.2.dll : fatal error LNK1120: 1 unresolved externals
    [1975/3832] Linking target subprojects/pango/pango/pangowin32-1.0-0.dll
    Creating library subprojects\pango\pango\pangowin32-1.0.lib and object subprojects\pango\pango\pangowin32-1.0.exp
    [1976/3832] Linking target subprojects/pango/pango/pangoft2-1.0-0.dll
    Creating library subprojects\pango\pango\pangoft2-1.0.lib and object subprojects\pango\pango\pangoft2-1.0.exp
    [1977/3832] Compiling C object subprojects/gdk-pixbuf/gdk-pixbuf/gdk_pixbuf-2.0-0.dll.p/gdk-pixbuf-io.c.obj
    ../subprojects/gdk-pixbuf/gdk-pixbuf/gdk-pixbuf-io.c(1309): warning C4244: '=': conversion from 'double' to 'int', possible loss of data
    ../subprojects/gdk-pixbuf/gdk-pixbuf/gdk-pixbuf-io.c(1314): warning C4244: '=': conversion from 'double' to 'int', possible loss of data
    ../subprojects/gdk-pixbuf/gdk-pixbuf/gdk-pixbuf-io.c(1319): warning C4244: '=': conversion from 'double' to 'int', possible loss of data
    ../subprojects/gdk-pixbuf/gdk-pixbuf/gdk-pixbuf-io.c(1322): warning C4244: '=': conversion from 'double' to 'int', possible loss of data
    ninja: build stopped: subcommand failed.

    I followed the steps explicitly and tried twice with the same result. Any ideas?

    Thanks!
    -John

    Reply to this comment

    Reply to this comment

  5. Valaist:
    Jul 19, 2021 at 04:04 PM

    Thanks for the tutorial. It seems there is an issue with the created "gspawn-win64-helper(-console).exe" which is used by the Vala compiler and possibly other mechanisms.

    On my machine, it always errors with

    GLib:ERROR:C:\vcpkg\buildtrees\glib\src\2.52.3-9cb1890713.clean\glib\gspawn-win32.c:378:set_child_error: code should not be reached

    Do you have an idea why?

    Reply to this comment

    Reply to this comment

    1. Xavier Claessens:
      Aug 10, 2021 at 01:52 PM

      Sorry but I never saw that error. The assertion happens because an error code is unknown in a switch() statement. It could help to print the value, and report that in glib issues.

      Reply to this comment

      Reply to this comment

  6. Carlo:
    Jul 19, 2021 at 07:40 PM

    Hello,

    Thanks for the tutorial! I had one issue with the C:\TDM-GCC-32, some library was missing. I ended up downloading it and included some more stuff. Then this ended up working but now I have the following issue:

    Compiler stderr:
    C:\src\gtk\build\meson-private\tmp9nbyjbky\testfile.c: In function 'main':
    C:\src\gtk\build\meson-private\tmp9nbyjbky\testfile.c:12:14: error: #error "No definition for __builtin__aligned_malloc found in the prefix"
    #error "No definition for __builtin__aligned_malloc found in the prefix"
    ^
    C:\src\gtk\build\meson-private\tmp9nbyjbky\testfile.c:20:13: error: '__builtin__aligned_malloc' undeclared (first use in this function)
    __builtin__aligned_malloc;
    ^
    C:\src\gtk\build\meson-private\tmp9nbyjbky\testfile.c:20:13: note: each undeclared identifier is reported only once for each function it appears in

    Checking for function "_aligned_malloc" : NO
    Running compile:
    Working directory: C:\src\gtk\build\meson-private\tmpdup4zcdd
    Command line: gcc C:\src\gtk\build\meson-private\tmpdup4zcdd\testfile.c -o C:\src\gtk\build\meson-private\tmpdup4zcdd\output.exe -D_FILE_OFFSET_BITS=64 -O0 -std=gnu99 -Wl,--start-group -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 -Wl,--end-group

    Code:
    #include
    #include

    #if defined __stub_aligned_alloc || defined __stub___aligned_alloc
    fail fail fail this function is not going to work
    #endif

    int main(void) {
    void *a = (void*) &aligned_alloc;
    long long b = (long long) a;
    return (int) b;
    }
    Compiler stdout:

    Compiler stderr:
    C:\src\gtk\build\meson-private\tmpdup4zcdd\testfile.c: In function 'main':
    C:\src\gtk\build\meson-private\tmpdup4zcdd\testfile.c:9:32: error: 'aligned_alloc' undeclared (first use in this function)
    void *a = (void*) &aligned_alloc;
    ^
    C:\src\gtk\build\meson-private\tmpdup4zcdd\testfile.c:9:32: note: each undeclared identifier is reported only once for each function it appears in
    C:\src\gtk\build\meson-private\tmpdup4zcdd\testfile.c:10:27: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    long long b = (long long) a;
    ^

    Running compile:
    Working directory: C:\src\gtk\build\meson-private\tmp0splwspb
    Command line: gcc C:\src\gtk\build\meson-private\tmp0splwspb\testfile.c -o C:\src\gtk\build\meson-private\tmp0splwspb\output.exe -D_FILE_OFFSET_BITS=64 -O0 -std=gnu99 -Wl,--start-group -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 -Wl,--end-group

    Code:
    #include
    int main(void) {

    /* With some toolchains (MSYS2/mingw for example) the compiler
    * provides various builtins which are not really implemented and
    * fall back to the stdlib where they aren't provided and fail at
    * build/link time. In case the user provides a header, including
    * the header didn't lead to the function being defined, and the
    * function we are checking isn't a builtin itself we assume the
    * builtin is not functional and we just error out. */
    #if !0 && !defined(aligned_alloc) && !0
    #error "No definition for __builtin_aligned_alloc found in the prefix"
    #endif

    #ifdef __has_builtin
    #if !__has_builtin(__builtin_aligned_alloc)
    #error "__builtin_aligned_alloc not found"
    #endif
    #elif ! defined(aligned_alloc)
    __builtin_aligned_alloc;
    #endif
    return 0;
    }
    Compiler stdout:

    Compiler stderr:
    C:\src\gtk\build\meson-private\tmp0splwspb\testfile.c: In function 'main':
    C:\src\gtk\build\meson-private\tmp0splwspb\testfile.c:12:14: error: #error "No definition for __builtin_aligned_alloc found in the prefix"
    #error "No definition for __builtin_aligned_alloc found in the prefix"
    ^
    C:\src\gtk\build\meson-private\tmp0splwspb\testfile.c:20:13: error: '__builtin_aligned_alloc' undeclared (first use in this function)
    __builtin_aligned_alloc;
    ^
    C:\src\gtk\build\meson-private\tmp0splwspb\testfile.c:20:13: note: each undeclared identifier is reported only once for each function it appears in

    Checking for function "aligned_alloc" : NO
    Running compile:
    Working directory: C:\src\gtk\build\meson-private\tmpsp3qak8_
    Command line: gcc C:\src\gtk\build\meson-private\tmpsp3qak8_\testfile.c -o C:\src\gtk\build\meson-private\tmpsp3qak8_\output.exe -D_FILE_OFFSET_BITS=64 -O0 -std=gnu99 -Wl,--start-group -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 -Wl,--end-group

    Code:
    #include
    #include

    #if defined __stub_posix_memalign || defined __stub___posix_memalign
    fail fail fail this function is not going to work
    #endif

    int main(void) {
    void *a = (void*) &posix_memalign;
    long long b = (long long) a;
    return (int) b;
    }
    Compiler stdout:

    Compiler stderr:
    C:\src\gtk\build\meson-private\tmpsp3qak8_\testfile.c: In function 'main':
    C:\src\gtk\build\meson-private\tmpsp3qak8_\testfile.c:10:27: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    long long b = (long long) a;
    ^
    c:/tdm-gcc-32/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: C:\Users\xxxxxxx\AppData\Local\Temp\ccQb62Xy.o:testfile.c:(.text+0x12): undefined reference to `posix_memalign'
    collect2.exe: error: ld returned 1 exit status

    Running compile:
    Working directory: C:\src\gtk\build\meson-private\tmpkv0f0h9x
    Command line: gcc C:\src\gtk\build\meson-private\tmpkv0f0h9x\testfile.c -o C:\src\gtk\build\meson-private\tmpkv0f0h9x\output.exe -D_FILE_OFFSET_BITS=64 -O0 -std=gnu99 -Wl,--start-group -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 -Wl,--end-group

    Code:
    #include
    int main(void) {

    /* With some toolchains (MSYS2/mingw for example) the compiler
    * provides various builtins which are not really implemented and
    * fall back to the stdlib where they aren't provided and fail at
    * build/link time. In case the user provides a header, including
    * the header didn't lead to the function being defined, and the
    * function we are checking isn't a builtin itself we assume the
    * builtin is not functional and we just error out. */
    #if !0 && !defined(posix_memalign) && !0
    #error "No definition for __builtin_posix_memalign found in the prefix"
    #endif

    #ifdef __has_builtin
    #if !__has_builtin(__builtin_posix_memalign)
    #error "__builtin_posix_memalign not found"
    #endif
    #elif ! defined(posix_memalign)
    __builtin_posix_memalign;
    #endif
    return 0;
    }
    Compiler stdout:

    Compiler stderr:
    C:\src\gtk\build\meson-private\tmpkv0f0h9x\testfile.c: In function 'main':
    C:\src\gtk\build\meson-private\tmpkv0f0h9x\testfile.c:12:14: error: #error "No definition for __builtin_posix_memalign found in the prefix"
    #error "No definition for __builtin_posix_memalign found in the prefix"
    ^
    C:\src\gtk\build\meson-private\tmpkv0f0h9x\testfile.c:20:13: error: '__builtin_posix_memalign' undeclared (first use in this function)
    __builtin_posix_memalign;
    ^
    C:\src\gtk\build\meson-private\tmpkv0f0h9x\testfile.c:20:13: note: each undeclared identifier is reported only once for each function it appears in

    Checking for function "posix_memalign" : NO

    subprojects\graphene\meson.build:170:2: ERROR: Problem encountered: No aligned malloc function could be found.


    Any idea on this one?


    Also, now that the commits have been merged. Do I still need this below?

    git config --global user.email "xavier.claessens@collabora.com"
    git config --global user.name "Xavier Claessens"

    Thank you for the help!

    Reply to this comment

    Reply to this comment

    1. Xavier Claessens:
      Aug 10, 2021 at 01:45 PM

      You seems to be using gcc and not visual studio compiler. I'm sorry but I don't know why it fails, I never saw that error myself.

      > Also, now that the commits have been merged. Do I still need this below?

      You can skip that indeed.

      Reply to this comment

      Reply to this comment

  7. George Florea:
    Sep 08, 2021 at 09:31 AM

    The meson configuration step fails for me. It seems to give up when trying to figure out what to do about gstreamer-player-1.0

    Program sassc found: NO
    Cloning into 'sassc'...
    remote: Enumerating objects: 43, done.
    remote: Counting objects: 100% (43/43), done.
    remote: Compressing objects: 100% (37/37), done. objects: 4% (2/43)
    Receiving objects: 93% (40/43)sed 26 (delta 0), pack-reused 0Receiving objects: 90% (39/43)
    Receiving objects: 100% (43/43), 29.46 KiB | 685.00 KiB/s, done.

    Executing subproject sassc

    sassc| Project name: sassc
    sassc| Project version: 3.5.0.99
    sassc| C compiler for the host machine: cl (msvc 19.29.30133 "Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30133 for x64")
    sassc| C linker for the host machine: link link 14.29.30133.0
    sassc| Configuring sassc_version.h using configuration
    sassc| Run-time dependency libsass found: NO (tried pkgconfig and cmake)
    sassc| Looking for a fallback subproject for the dependency libsass
    Cloning into 'libsass'...
    remote: Enumerating objects: 257, done.
    remote: Counting objects: 100% (257/257), done.
    remote: Compressing objects: 100% (250/250), done. eceiving objects: 1
    Receiving obl 257 (delta 6), reused 62 (delta 0), pack-reused 0
    Receiving objects: 100% (257/257), 385.24 KiB | 3.41 MiB/s, done.
    Resolving deltas: 100% (6/6), done.

    Executing subproject sassc:libsass

    libsass| Project name: libsass
    libsass| Project version: 3.6.4
    libsass| C compiler for the host machine: cl (msvc 19.29.30133 "Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30133 for x64")
    libsass| C linker for the host machine: link link 14.29.30133.0
    libsass| C++ compiler for the host machine: cl (msvc 19.29.30133 "Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30133 for x64")
    libsass| C++ linker for the host machine: link link 14.29.30133.0
    libsass| Configuring version.h using configuration
    libsass| Library dl found: NO
    libsass| Configuring libsass.pc using configuration
    libsass| Build targets in project: 758
    libsass| Subproject libsass finished.

    sassc| Dependency libsass from subproject subprojects/libsass found: YES 3.6.4
    sassc| Build targets in project: 760
    sassc| Subproject sassc finished.

    Program sassc found: YES (overridden)
    Program glib-compile-resources found: YES (overridden)
    Configuring de.gresource.xml using configuration
    Program glib-compile-resources found: YES (overridden)
    Configuring fr.gresource.xml using configuration
    Program glib-compile-resources found: YES (overridden)
    Configuring es.gresource.xml using configuration
    Program glib-compile-resources found: YES (overridden)
    Configuring zh.gresource.xml using configuration
    Program glib-compile-resources found: YES (overridden)
    Program gdbus-codegen found: YES (overridden)
    Program glib-genmarshal found: YES (overridden)
    Program glib-mkenums found: YES (overridden)
    Program glib-mkenums found: YES (overridden)
    Program gentypefuncs.py found: YES (C:\Users\George\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe C:\Users\George\source\repos\gtk\gtk\gentypefuncs.py)
    Configuring gtkversion.h using configuration
    Library advapi32 found: YES
    Library comctl32 found: YES
    Library crypt32 found: YES
    Library dwmapi found: YES
    Library imm32 found: YES
    Library setupapi found: YES
    Library winmm found: YES
    Configuring gtk-win32.rc.body using configuration
    Configuring libgtk4.manifest using configuration
    Program glib-compile-schemas found: YES (overridden)
    Has header "langinfo.h" : NO
    Program g-ir-scanner found: NO
    Dependency libavcodec skipped: feature media-ffmpeg disabled
    Run-time dependency gstreamer-player-1.0 found: NO (tried cmake)

    modules\media\meson.build:44:0: ERROR: Pkg-config binary for machine MachineChoice.HOST not found. Giving up.

    Reply to this comment

    Reply to this comment

    1. Xavier Claessens:
      Oct 15, 2021 at 08:11 PM

      GTK maintainer made the GStreamer required by default. You can build with -Dgtk:media-gstreamer=disabled. This will be fixed in the future by adding a gstreamer.wrap in gtk to build gstreamer as subproject of gtk, but they haven't done it yet.

      Reply to this comment

      Reply to this comment

  8. Peter Lock:
    Jan 22, 2022 at 04:06 AM

    Seems to fail getting the meson-install-script
    fatal: couldn't find remote ref meson-install-script

    Reply to this comment

    Reply to this comment

    1. Raul:
      Jan 23, 2022 at 06:16 PM

      I believe you can skip those 2 steps.

      Reply to this comment

      Reply to this comment

      1. Peter Lock:
        Jan 24, 2022 at 01:47 AM

        Thank Raul. Yes I managed to get past to compile but it complains of missing crt/externals and others, so will look into it a bit more when I get some spare time. Cheers

        Reply to this comment

        Reply to this comment

    2. Xavier Claessens:
      Jan 24, 2022 at 01:57 PM

      The `meson-install-script` has been merged upstream already, so you don't need to fetch that branch any more.

      Reply to this comment

      Reply to this comment

  9. Christian:
    Feb 10, 2022 at 03:05 AM

    There seems to be an SSL Error for me when the script tries to download PCRE subproject. Does anyone face the same issue?

    glib| Using subprojects\glib\subprojects\pcre.wrap
    glib| Downloading pcre source from https://sourceforge.net/projects/pcre/files/pcre/8.37/pcre-8.37.tar.bz2
    glib|
    glib| A fallback URL could be specified using source_fallback_url key in the wrap file

    subprojects\glib\meson.build:2015:2: ERROR: could not get https://sourceforge.net/projects/pcre/files/pcre/8.37/pcre-8.37.tar.bz2 is the internet available?

    A full log can be found at C:\src\gtk\build\meson-logs\meson-log.txt

    Reply to this comment

    Reply to this comment

  10. Christian Ohrfandl:
    Feb 10, 2022 at 11:43 AM

    So, setup finally worked for me (it seems there are SSL_CERTIFICATE_VERIFY errors for meson wrap db downloads and certain other repos aswell; needed to download manually into subprojects/packagecache directory.

    However, when running ninja for compilation it seems to not be able to compile certain subprojects because of e.g. symbol generation errors. Can you help me out?

    [335/9720] Generating symbol file subprojects/libffi/src/ffi-7.dll.p/ffi-7.dll.symbols
    FAILED: subprojects/libffi/src/ffi-7.dll.p/ffi-7.dll.symbols
    "C:\Users\Christian\AppData\Roaming\Python\Python310\Scripts\meson" "--internal" "symbolextractor" "C:\src\gtk\build" subprojects/libffi/src/ffi-7.dll "subprojects\libffi\src\ffi.lib" subprojects/libffi/src/ffi-7.dll.p/ffi-7.dll.symbols
    [336/9720] Compiling C object subprojects/glib/glib/glib-2.0-0.dll.p/gdatetime.c.obj
    ../subprojects/glib/glib/gdatetime.c(2895): warning C4100: "use_alt_digits": Unreferenzierter formaler Parameter
    ../subprojects/glib/glib/gdatetime.c(3054): warning C4267: "=": Konvertierung von "size_t" nach "guint", Datenverlust möglich
    [338/9720] Compiling C object subprojects/glib/glib/glib-2.0-0.dll.p/gdir.c.obj
    C:\src\gtk\subprojects\glib\glib\glib-private.h(56): warning C4100: "p": Unreferenzierter formaler Parameter
    C:\src\gtk\subprojects\glib\glib\glib-private.h(72): warning C4100: "strv": Unreferenzierter formaler Parameter
    ../subprojects/glib/glib/gdir.c(88): warning C4100: "flags": Unreferenzierter formaler Parameter
    ../subprojects/glib/glib/gdir.c(181): warning C4100: "dirp": Unreferenzierter formaler Parameter
    C:\src\gtk\subprojects\glib\glib\gdir.c(195) : warning C4702: Unerreichbarer Code
    [339/9720] Compiling C object subprojects/glib/glib/gnulib/libgnulib.a.p/vasnprintf.c.obj
    ../subprojects/glib/glib/gnulib/vasnprintf.c(574): warning C4127: Bedingter Ausdruck ist konstant
    ../subprojects/glib/glib/gnulib/vasnprintf.c(1113): warning C4267: "-=": Konvertierung von "size_t" nach "int", Datenverlust möglich
    ../subprojects/glib/glib/gnulib/vasnprintf.c(1114): warning C4267: "-=": Konvertierung von "size_t" nach "int", Datenverlust möglich
    ../subprojects/glib/glib/gnulib/vasnprintf.c(1550): warning C4100: "flags": Unreferenzierter formaler Parameter
    ../subprojects/glib/glib/gnulib/vasnprintf.c(1896): warning C4127: Bedingter Ausdruck ist konstant
    ../subprojects/glib/glib/gnulib/vasnprintf.c(1933): warning C4267: "=": Konvertierung von "size_t" nach "char", Datenverlust möglich
    ../subprojects/glib/glib/gnulib/vasnprintf.c(1936): warning C4267: "=": Konvertierung von "size_t" nach "short", Datenverlust möglich
    ../subprojects/glib/glib/gnulib/vasnprintf.c(1939): warning C4267: "=": Konvertierung von "size_t" nach "int", Datenverlust möglich
    ../subprojects/glib/glib/gnulib/vasnprintf.c(1942): warning C4267: "=": Konvertierung von "size_t" nach "long", Datenverlust möglich
    ../subprojects/glib/glib/gnulib/vasnprintf.c(2452): warning C4146: Einem vorzeichenlosen Typ wurde ein unärer Minus-Operator zugewiesen. Das Ergebnis ist weiterhin vorzeichenlos.
    ../subprojects/glib/glib/gnulib/vasnprintf.c(2686): warning C4267: "=": Konvertierung von "size_t" nach "int", Datenverlust möglich
    ../subprojects/glib/glib/gnulib/vasnprintf.c(2731): warning C4267: "=": Konvertierung von "size_t" nach "int", Datenverlust möglich
    ../subprojects/glib/glib/gnulib/vasnprintf.c(2861): warning C4267: "=": Konvertierung von "size_t" nach "int", Datenverlust möglich
    ../subprojects/glib/glib/gnulib/vasnprintf.c(2890): warning C4267: "=": Konvertierung von "size_t" nach "int", Datenverlust möglich
    ../subprojects/glib/glib/gnulib/vasnprintf.c(2971): warning C4146: Einem vorzeichenlosen Typ wurde ein unärer Minus-Operator zugewiesen. Das Ergebnis ist weiterhin vorzeichenlos.
    ../subprojects/glib/glib/gnulib/vasnprintf.c(3185): warning C4127: Bedingter Ausdruck ist konstant
    ../subprojects/glib/glib/gnulib/vasnprintf.c(3336): warning C4127: Bedingter Ausdruck ist konstant
    ../subprojects/glib/glib/gnulib/vasnprintf.c(3476): warning C4146: Einem vorzeichenlosen Typ wurde ein unärer Minus-Operator zugewiesen. Das Ergebnis ist weiterhin vorzeichenlos.
    ../subprojects/glib/glib/gnulib/vasnprintf.c(3659): warning C4267: "Funktion": Konvertierung von "size_t" nach "int", Datenverlust möglich
    ../subprojects/glib/glib/gnulib/vasnprintf.c(3796): warning C4127: Bedingter Ausdruck ist konstant
    ../subprojects/glib/glib/gnulib/vasnprintf.c(3977): warning C4127: Bedingter Ausdruck ist konstant
    ../subprojects/glib/glib/gnulib/vasnprintf.c(4124): warning C4267: "Funktion": Konvertierung von "size_t" nach "int", Datenverlust möglich
    ../subprojects/glib/glib/gnulib/vasnprintf.c(4269): warning C4127: Bedingter Ausdruck ist konstant
    ../subprojects/glib/glib/gnulib/vasnprintf.c(4462): warning C4127: Bedingter Ausdruck ist konstant
    ../subprojects/glib/glib/gnulib/vasnprintf.c(4658): warning C4146: Einem vorzeichenlosen Typ wurde ein unärer Minus-Operator zugewiesen. Das Ergebnis ist weiterhin vorzeichenlos.
    ../subprojects/glib/glib/gnulib/vasnprintf.c(4802): warning C4127: Bedingter Ausdruck ist konstant
    ../subprojects/glib/glib/gnulib/vasnprintf.c(4823): warning C4127: Bedingter Ausdruck ist konstant
    [340/9720] Generating symbol file subprojects/zlib-1.2.11/z.dll.p/z.dll.symbols
    FAILED: subprojects/zlib-1.2.11/z.dll.p/z.dll.symbols
    "C:\Users\Christian\AppData\Roaming\Python\Python310\Scripts\meson" "--internal" "symbolextractor" "C:\src\gtk\build" subprojects/zlib-1.2.11/z.dll "subprojects\zlib-1.2.11\z.lib" subprojects/zlib-1.2.11/z.dll.p/z.dll.symbols
    [341/9720] Generating symbol file subprojects/proxy-libintl/intl-8.dll.p/intl-8.dll.symbols
    FAILED: subprojects/proxy-libintl/intl-8.dll.p/intl-8.dll.symbols
    "C:\Users\Christian\AppData\Roaming\Python\Python310\Scripts\meson" "--internal" "symbolextractor" "C:\src\gtk\build" subprojects/proxy-libintl/intl-8.dll "subprojects\proxy-libintl\intl.lib" subprojects/proxy-libintl/intl-8.dll.p/intl-8.dll.symbols
    [343/9720] Compiling C object subprojects/glib/glib/glib-2.0-0.dll.p/ggettext.c.obj
    C:\src\gtk\subprojects\glib\glib\glib-private.h(56): warning C4100: "p": Unreferenzierter formaler Parameter
    C:\src\gtk\subprojects\glib\glib\glib-private.h(72): warning C4100: "strv": Unreferenzierter formaler Parameter
    [344/9720] Compiling C object subprojects/pcre-8.37/libpcre.a.p/pcre_exec.c.obj
    ninja: build stopped: subcommand failed.

    Reply to this comment

    Reply to this comment

  11. Mavaji:
    Apr 08, 2022 at 01:20 PM

    Getting below error after running "meson compile -C build"
    Can anyone help me out ?

    C:\src\gtk>meson compile -C build ninja: Entering directory `C:/src/gtk/build' [2/1237] Compiling C object subprojects/x264/libx264-8.a.p/encoder_lookahead.c.obj FAILED: subprojects/x264/libx264-8.a.p/encoder_lookahead.c.obj "cl" "-Isubprojects\x264\libx264-8.a.p" "-Isubprojects\x264" "-I..\subprojects\x264" "/MD" "/nologo" "/showIncludes" "/utf-8" "/W2" "/O2" "/Zi" "-DDEBUG" "/wd4018" "/wd4146" "/wd4244" "/wd4305" "-DHIGH_BIT_DEPTH=0" "-DBIT_DEPTH=8" "-DX264_API_EXPORTS" "/Fdsubprojects\x264\libx264-8.a.p\encoder_lookahead.c.pdb" /Fosubprojects/x264/libx264-8.a.p/encoder_lookahead.c.obj "/c" ../subprojects/x264/encoder/lookahead.c ../subprojects/x264/encoder/lookahead.c(90): error C2143: syntax error: missing ')' before '(' ../subprojects/x264/encoder/lookahead.c(90): error C2059: syntax error: ')' ../subprojects/x264/encoder/lookahead.c(90): error C2143: syntax error: missing ')' before 'type' ../subprojects/x264/encoder/lookahead.c(90): error C2091: function returns function ../subprojects/x264/encoder/lookahead.c(91): error C2085: 'lookahead_thread': not in formal parameter list ../subprojects/x264/encoder/lookahead.c(91): error C2143: syntax error: missing ';' before '{' ../subprojects/x264/encoder/lookahead.c(92): error C2065: 'h': undeclared identifier ../subprojects/x264/encoder/lookahead.c(92): error C2223: left of '->lookahead' must point to struct/union ../subprojects/x264/encoder/lookahead.c(94): error C2065: 'h': undeclared identifier ../subprojects/x264/encoder/lookahead.c(94): error C2223: left of '->lookahead' must point to struct/union ../subprojects/x264/encoder/lookahead.c(94): error C2198: 'x264_pthread_mutex_lock': too few arguments for call ../subprojects/x264/encoder/lookahead.c(95): error C2065: 'h': undeclared identifier ../subprojects/x264/encoder/lookahead.c(95): error C2223: left of '->lookahead' must point to struct/union ../subprojects/x264/encoder/lookahead.c(95): error C2198: 'x264_pthread_mutex_lock': too few arguments for call ../subprojects/x264/encoder/lookahead.c(96): error C2065: 'h': undeclared identifier ../subprojects/x264/encoder/lookahead.c(96): error C2223: left of '->lookahead' must point to struct/union ../subprojects/x264/encoder/lookahead.c(97): error C2065: 'h': undeclared identifier ../subprojects/x264/encoder/lookahead.c(97): error C2223: left of '->lookahead' must point to struct/union ../subprojects/x264/encoder/lookahead.c(97): warning C4047: 'function': 'x264_sync_frame_list_t *' differs in levels of indirection from 'int' ../subprojects/x264/encoder/lookahead.c(97): warning C4024: 'lookahead_shift': different types for formal and actual parameter 1 ../subprojects/x264/encoder/lookahead.c(97): error C2198: 'lookahead_shift': too few arguments for call ../subprojects/x264/encoder/lookahead.c(98): error C2065: 'h': undeclared identifier ../subprojects/x264/encoder/lookahead.c(98): error C2223: left of '->lookahead' must point to struct/union ../subprojects/x264/encoder/lookahead.c(98): error C2198: 'x264_pthread_mutex_unlock': too few arguments for call ../subprojects/x264/encoder/lookahead.c(99): error C2065: 'h': undeclared identifier ../subprojects/x264/encoder/lookahead.c(99): error C2223: left of '->lookahead' must point to struct/union ../subprojects/x264/encoder/lookahead.c(99): error C2223: left of '->param' must point to struct/union ../subprojects/x264/encoder/lookahead.c(101): error C2065: 'h': undeclared identifier ../subprojects/x264/encoder/lookahead.c(101): error C2223: left of '->lookahead' must point to struct/union ../subprojects/x264/encoder/lookahead.c(102): error C2065: 'h': undeclared identifier ../subprojects/x264/encoder/lookahead.c(102): error C2223: left of '->lookahead' must point to struct/union ../subprojects/x264/encoder/lookahead.c(102): error C2198: 'x264_pthread_cond_wait': too few arguments for call ../subprojects/x264/encoder/lookahead.c(103): error C2065: 'h': undeclared identifier ../subprojects/x264/encoder/lookahead.c(103): error C2223: left of '->lookahead' must point to struct/union ../subprojects/x264/encoder/lookahead.c(103): error C2198: 'x264_pthread_mutex_unlock': too few arguments for call ../subprojects/x264/encoder/lookahead.c(107): error C2065: 'h': undeclared identifier ../subprojects/x264/encoder/lookahead.c(107): error C2223: left of '->lookahead' must point to struct/union ../subprojects/x264/encoder/lookahead.c(107): error C2198: 'x264_pthread_mutex_unlock': too few arguments for call ../subprojects/x264/encoder/lookahead.c(108): error C2065: 'h': undeclared identifier ../subprojects/x264/encoder/lookahead.c(108): warning C4047: 'function': 'x264_t *' differs in levels of indirection from 'int' ../subprojects/x264/encoder/lookahead.c(108): warning C4024: 'lookahead_slicetype_decide': different types for formal and actual parameter 1 ../subprojects/x264/encoder/lookahead.c(111): error C2065: 'h': undeclared identifier ../subprojects/x264/encoder/lookahead.c(111): error C2223: left of '->lookahead' must point to struct/union ../subprojects/x264/encoder/lookahead.c(111): error C2198: 'x264_pthread_mutex_lock': too few arguments for call ../subprojects/x264/encoder/lookahead.c(112): error C2065: 'h': undeclared identifier ../subprojects/x264/encoder/lookahead.c(112): error C2223: left of '->lookahead' must point to struct/union ../subprojects/x264/encoder/lookahead.c(112): error C2198: 'x264_pthread_mutex_lock': too few arguments for call ../subprojects/x264/encoder/lookahead.c(113): error C2065: 'h': undeclared identifier ../subprojects/x264/encoder/lookahead.c(113): error C2223: left of '->lookahead' must point to struct/union ../subprojects/x264/encoder/lookahead.c(113): error C2198: 'lookahead_shift': too few arguments for call ../subprojects/x264/encoder/lookahead.c(114): error C2065: 'h': undeclared identifier ../subprojects/x264/encoder/lookahead.c(114): error C2223: left of '->lookahead' must point to struct/union ../subprojects/x264/encoder/lookahead.c(114): error C2198: 'x264_pthread_mutex_unlock': too few arguments for call ../subprojects/x264/encoder/lookahead.c(115): error C2065: 'h': undeclared identifier ../subprojects/x264/encoder/lookahead.c(115): error C2223: left of '->lookahead' must point to struct/union ../subprojects/x264/encoder/lookahead.c(115): error C2198: 'x264_pthread_mutex_unlock': too few arguments for call ../subprojects/x264/encoder/lookahead.c(116): error C2065: 'h': undeclared identifier ../subprojects/x264/encoder/lookahead.c(116): error C2223: left of '->lookahead' must point to struct/union ../subprojects/x264/encoder/lookahead.c(117): error C2065: 'h': undeclared identifier ../subprojects/x264/encoder/lookahead.c(117): warning C4047: 'function': 'x264_t *' differs in levels of indirection from 'int' ../subprojects/x264/encoder/lookahead.c(117): warning C4024: 'lookahead_slicetype_decide': different types for formal and actual parameter 1 ../subprojects/x264/encoder/lookahead.c(118): error C2065: 'h': undeclared identifier ../subprojects/x264/encoder/lookahead.c(118): error C2223: left of '->lookahead' must point to struct/union ../subprojects/x264/encoder/lookahead.c(118): error C2198: 'x264_pthread_mutex_lock': too few arguments for call ../subprojects/x264/encoder/lookahead.c(119): error C2065: 'h': undeclared identifier ../subprojects/x264/encoder/lookahead.c(119): error C2223: left of '->lookahead' must point to struct/union ../subprojects/x264/encoder/lookahead.c(120): error C2065: 'h': undeclared identifier ../subprojects/x264/encoder/lookahead.c(120): error C2223: left of '->lookahead' must point to struct/union ../subprojects/x264/encoder/lookahead.c(120): error C2198: 'x264_pthread_cond_broadcast': too few arguments for call ../subprojects/x264/encoder/lookahead.c(121): error C2065: 'h': undeclared identifier ../subprojects/x264/encoder/lookahead.c(121): error C2223: left of '->lookahead' must point to struct/union ../subprojects/x264/encoder/lookahead.c(121): error C2198: 'x264_pthread_mutex_unlock': too few arguments for call ../subprojects/x264/encoder/lookahead.c(156): error C2065: 'lookahead_thread': undeclared identifier ../subprojects/x264/encoder/lookahead.c(156): warning C4312: 'type cast': conversion from 'int' to 'void *' of greater size [7/1237] Compiling C object subprojects/x264/libx264-8.a.p/encoder_macroblock.c.obj ninja: build stopped: subcommand failed.

    Reply to this comment

    Reply to this comment

    1. Xavier Claessens:
      Apr 11, 2022 at 03:18 PM

      That seems to be a build issue in x264. I don't know what could cause this exactly, but you could probably ask them directly: https://code.videolan.org/videolan/x264.

      Reply to this comment

      Reply to this comment

  12. LNX:
    Jun 11, 2022 at 06:03 PM

    Hello, I have followed the guide, notably on Windows 11, most importantly, using Visual Studio 2022.

    I'm having two major problems, the first one is related to the `x64 Native Tools Command Prompt for VS 2022` shell.
    Opening it brings me into the `C:\Program Files\Microsoft Visual Studio\2022\Community`, as, I would guess, expected.
    However, I ma unable to create directories due to "Access id denied", yes, also as admin, which I wouldn't wanna do regardless, and I'm also unable to cd my out of there, saying in disk "D:".

    I sort of ignored this problem and moved onward with the steps (yes, visual studio 2022 is installed correctly with the Dekstop C++ Development packages).

    When calling `meson setup build --prefix D:/Dev/Libraries/gnome` or even `meson setup build --prefix D:/gnome` or `meson setup build --prefix C:/gnome` I always get an error in the end:
    "
    Has header "langinfo.h" : NO
    Program g-ir-scanner found: NO
    Dependency libavfilter skipped: feature media-ffmpeg disabled
    Run-time dependency gstreamer-player-1.0 found: NO (tried cmake)

    modules\media\meson.build:44:0: ERROR: Pkg-config binary for machine 1 not found. Giving up.
    "

    Aside from the skipped libraries, which I assume would result in a lack of some features, the blocking problem is the missing "pkg-config" installation. I tried looking for it, but everything I see regards msys and mingw, which, from what I've seen, has nothing to do with this guide.

    How am I supposed to fix this issue?

    I do apologize if the issue is due to a completely lack of knowledge on my side regarding the matter, and thank you in advance for any help!

    Reply to this comment

    Reply to this comment

    1. Xavier Claessens:
      Jun 13, 2022 at 03:20 PM

      You need to disable GStreamer support in GTK with `-Dmedia-gstreamer=disabled`. If you need to enable GStreamer support, there are instructions in the part 2 of this blog: https://www.collabora.com/news-and-blog/blog/2021/04/29/build-your-own-application-with-gtk4-as-a-meson-subproject.

      Reply to this comment

      Reply to this comment

  13. Jonathan Bendor:
    Nov 24, 2022 at 08:16 PM

    FAILED --- file meson-log.txt shows in line 3: Build Options: -Dgtk:media-gstreamer=disabled
    windows console shows the following :
    Run-time dependency gstreamer-player-1.0 found: NO
    modules\media\meson.build:42:0: ERROR: Dependency lookup for gstreamer-player-1.0 with method 'pkgconfig' failed: Pkg-config binary for machine 1 not found. Giving up.

    is there any simple fix for this error ?

    Reply to this comment

    Reply to this comment

  14. Jonathan Bendor:
    Nov 24, 2022 at 10:49 PM

    Simple Fix --- edit the file "meson_options.txt" and directly disable the option "'media-gstreamer'"

    Reply to this comment

    Reply to this comment

  15. ben:
    Mar 03, 2024 at 05:27 PM

    I built GTK in windows using

    pip install gvsbuild
    gvsbuild build gtk4

    and that created gtk-build folder with 4GB of files (cmake, ninja, meson, cairo rendering, etc)

    It didn't generate a demo exe, but more importantly, how do you setup Visual Studio Community, to point to the right header / library files?

    Reply to this comment

    Reply to this comment

    1. Xavier Claessens:
      Mar 04, 2024 at 02:56 PM

      I don't know if gvsbuild compiles examples, you should check build options it sets. About finding headers, you should point it to `compile_commands.json` file generated by Meson in your build directory. There are more up to date information in this blog post about VSCode (VisualStudio should be similar): https://www.collabora.com/news-and-blog/blog/2023/04/18/meson-and-vscode-develop-your-project-modern-ide/

      Reply to this comment

      Reply to this comment


Add a Comment






Allowed tags: <b><i><br>Add a new comment:


Search the newsroom

Latest Blog Posts

Faster inference: torch.compile vs TensorRT

19/12/2024

In the world of deep learning optimization, two powerful tools stand out: torch.compile, PyTorch’s just-in-time (JIT) compiler, and NVIDIA’s…

Mesa CI and the power of pre-merge testing

08/10/2024

Having multiple developers work on pre-merge testing distributes the process and ensures that every contribution is rigorously tested before…

A shifty tale about unit testing with Maxwell, NVK's backend compiler

15/08/2024

After rigorous debugging, a new unit testing framework was added to the backend compiler for NVK. This is a walkthrough of the steps taken…

A journey towards reliable testing in the Linux Kernel

01/08/2024

We're reflecting on the steps taken as we continually seek to improve Linux kernel integration. This will include more detail about the…

Building a Board Farm for Embedded World

27/06/2024

With each board running a mainline-first Linux software stack and tested in a CI loop with the LAVA test framework, the Farm showcased Collabora's…

Smart audio filters with WirePlumber 0.5

26/06/2024

WirePlumber 0.5 arrived recently with many new and essential features including the Smart Filter Policy, enabling audio filters to automatically…

Open Since 2005 logo

Our website only uses a strictly necessary session cookie provided by our CMS system. To find out more please follow this link.

Collabora Limited © 2005-2024. All rights reserved. Privacy Notice. Sitemap.