gadgetsfere.blogg.se

Gtk on windows
Gtk on windows











gtk on windows
  1. #Gtk on windows how to#
  2. #Gtk on windows code#

Package gtk+-3.0 was not found in the pkg-config search path. bashrc export PATH=$PATH:/mingw64/bin Problem #2 undefined references to gtk functions gcc -o template_app main.o -pthread `pkg-config -cflags -libs gtk+-3.0` So I tried to compile the template using the makefile.

#Gtk on windows how to#

The only difference is the hello world guide shows you how to use Glade to create the UI itself. I quickly realised that for what I wanted the template was my “hello world”. So part of the first step on our guide is to create a set of template files. Obviously you need to either log out and in again, or also run in the terminal to pick this up.įinally I created a shortcut for the MSYS2 terminal I added this to my ~/.bashrc – alias vi=vim

gtk on windows

Obviously we need a compiler: pacman -S base-devel mingw-w64-x86_64-toolchainĪnd we need gtk3 and glade: pacman -S mingw-w64-x86_64-gtk3 mingw-w64-x86_64-glade3Īlso, just because they’re generally useful: pacman -S git vim This involved re-starting the MSYS2 window a one point, there was a message to this effect. I updated the package manager: pacman -Syuu Next I installed MSYS2 – I just followed the steps from the website. So I was looking for a “hello world” I could adapt once I’d figured out the basics.

#Gtk on windows code#

I was doing so because having used Glade 2 on a work project I quickly found there were significant differences in Glade 3 – notably that it no longer generates template code for you. Initially I was following this guide as far as creating my simple Gtk program. Maybe later I’ll try to write a proper tutorial. In fact I thought it might be fun to give you a walk through of what I did, what issues I hit and how I solved them. I’ve cobbled this together from a bunch of articles and my own fumblings. I’m not an expert but I’m hoping it will provide the kind of help I was looking for when I tried to do this. This post will detail my attempts to get a simple “Hello World” Glade/Gtk program working on Windows.













Gtk on windows