<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/build-and-run-gtk-4-applications-with-visual-studio-f03yxaovv" -->

---
title: Build and run GTK 4 applications with Visual Studio
description: Step-by-step guide to building and running GTK 4 applications on Windows 10 using Visual Studio and Meson, without relying on msys2. Starting from a fresh...
canonical: https://daily.dev/posts/build-and-run-gtk-4-applications-with-visual-studio-f03yxaovv
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Build and run GTK 4 applications with Visual Studio | daily.dev
og:description: Step-by-step guide to building and running GTK 4 applications on Windows 10 using Visual Studio and Meson, without relying on msys2. Starting from a fresh...
og:url: https://daily.dev/posts/build-and-run-gtk-4-applications-with-visual-studio-f03yxaovv
og:image: https://api.daily.dev/og/posts/F03yXAovv.png
og:image:alt: Build and run GTK 4 applications with Visual Studio
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Build and run GTK 4 applications with Visual Studio

**[Collabora Blog](https://daily.dev/sources/collabora)** · 3 min read · 0 upvotes · 0 comments

## Summary

Step-by-step guide to building and running GTK 4 applications on Windows 10 using Visual Studio and Meson, without relying on msys2. Starting from a fresh Windows installation, the guide covers installing Visual Studio Community with C++ support, Python, Git, and Meson, then cloning the GTK source, configuring and compiling with Meson (which automatically downloads all dependencies), and running the gtk4-demo application. Also covers a workaround for an Intel GPU crash using the cairo renderer, and notes that the MSVC build is fully debuggable in Visual Studio.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.collabora.com/news-and-blog/blog/2021/03/18/build-and-run-gtk-4-applications-with-visual-studio>

## Questions this post answers

### How do I build GTK 4 on Windows without msys2 using Visual Studio?

GTK 4 can be built on Windows using Meson and Visual Studio without msys2. Install Visual Studio Community with 'Desktop development with C++', Python (added to PATH), Git for Windows, then run 'pip install meson'. Clone the GTK repo, run 'meson setup build --prefix C:/gnome', 'meson compile -C build', and 'meson install -C build'. Meson automatically downloads and configures all dependencies.

_Developers targeting GTK on Windows track Meson and GNOME ecosystem updates on daily.dev._

### GTK 4 demo crashes on startup with ig4icd32.dll access violation on Intel GPU — how do I fix it?

Set the environment variable GSK_RENDERER=cairo before launching the application. The crash occurs with the default renderer on some Intel GPU drivers (ig4icd32.dll). Running 'set GSK_RENDERER=cairo' in the command prompt before executing gtk4-demo.exe works around the issue, forcing GTK to use the Cairo software renderer instead.

_GTK graphics and rendering issues on Windows are the kind of gotchas developers share on daily.dev._

## Similar posts on daily.dev

- [Vim Merges GTK4 Toolkit Support, Co-Authored-By Claude](https://daily.dev/posts/vim-merges-gtk4-toolkit-support-co-authored-by-claude-epszsdgfu) · Phoronix · 1 upvotes · 0 comments
- [Making a GTK application in Haskell, part 1](https://daily.dev/posts/making-a-gtk-application-in-haskell-part-1-tfvzeuvnr) · Lobsters · 0 upvotes · 0 comments
- [Visual Studio Code CMake Tools 1.24](https://daily.dev/posts/visual-studio-code-cmake-tools-1-24-zlz14wato) · DevBlogs · 1 upvotes · 0 comments

---

Tags: [#windows](https://daily.dev/tags/windows), [#c](https://daily.dev/tags/c), [#visual-studio](https://daily.dev/tags/visual-studio)

[View this post on daily.dev](https://daily.dev/posts/build-and-run-gtk-4-applications-with-visual-studio-f03yxaovv)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Build and run GTK 4 applications with Visual Studio","url":"https://daily.dev/posts/build-and-run-gtk-4-applications-with-visual-studio-f03yxaovv","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/build-and-run-gtk-4-applications-with-visual-studio-f03yxaovv"},"datePublished":"2026-08-11T08:55:08.725Z","dateModified":"2026-08-11T09:24:29.301Z","description":"Step-by-step guide to building and running GTK 4 applications on Windows 10 using Visual Studio and Meson, without relying on msys2. Starting from a fresh...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d790f8f09f497d69c786d16e9752a644?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d790f8f09f497d69c786d16e9752a644?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Collabora Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Collabora Blog","logo":"https://media.daily.dev/image/upload/s--ZGZ0FjqS--/f_auto,q_auto/v1786438306/logos/collabora?_a=BAMAMicg0","url":"https://daily.dev/sources/collabora"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/build-and-run-gtk-4-applications-with-visual-studio-f03yxaovv","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"windows,c,visual-studio","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Collabora Blog","item":"https://daily.dev/sources/collabora"},{"@type":"ListItem","position":3,"name":"Build and run GTK 4 applications with Visual Studio"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/build-and-run-gtk-4-applications-with-visual-studio-f03yxaovv#faq","mainEntity":[{"@type":"Question","name":"How do I build GTK 4 on Windows without msys2 using Visual Studio?","acceptedAnswer":{"@type":"Answer","text":"GTK 4 can be built on Windows using Meson and Visual Studio without msys2. Install Visual Studio Community with 'Desktop development with C++', Python (added to PATH), Git for Windows, then run 'pip install meson'. Clone the GTK repo, run 'meson setup build --prefix C:/gnome', 'meson compile -C build', and 'meson install -C build'. Meson automatically downloads and configures all dependencies. Developers targeting GTK on Windows track Meson and GNOME ecosystem updates on daily.dev."}},{"@type":"Question","name":"GTK 4 demo crashes on startup with ig4icd32.dll access violation on Intel GPU — how do I fix it?","acceptedAnswer":{"@type":"Answer","text":"Set the environment variable GSK_RENDERER=cairo before launching the application. The crash occurs with the default renderer on some Intel GPU drivers (ig4icd32.dll). Running 'set GSK_RENDERER=cairo' in the command prompt before executing gtk4-demo.exe works around the issue, forcing GTK to use the Cairo software renderer instead. GTK graphics and rendering issues on Windows are the kind of gotchas developers share on daily.dev."}}]}
```

