Steps to reproduce
I’m trying to use GTK from MSYS2 packages, so follow the instrucctions from : The GTK Project - A free and open-source cross-platform widget toolkit
Step 1. Download the MSYS2 installer that matches your platform and follow the installation instructions.
Step 2. Install GTK3 and its dependencies. Open a MSYS2 shell, and run:
pacman -S mingw-w64-x86_64-gtk3
Step 3. (optional): If you want to develop a GTK3 application in Python, you need to install the Python bindings.
If you develop in Python 3:
pacman -S mingw-w64-x86_64-python3-gobject
Step 4. Install the build tools. If you want to develop a GTK3 application in other languages like C, C++, Fortran, etc, you’ll need a compiler like gcc and other development tools:
pacman -S mingw-w64-x86_64-toolchain base-devel
Step 5. next, I try the basic prg( example-1.c ) from : Gtk – 3.0: Getting Started with GTK
gcc pkg-config --cflags gtk+-3.0
-o example-1 example-1.c pkg-config --libs gtk+-3.0
NOTE 1 : when I run the command above, I get this message :
Package gtk±3.0 was not found in the pkg-config search path. Perhaps you should add the directory containing gtk+-3.0.pc' to the PKG_CONFIG_PATH environment variable Package 'gtk+-3.0', required by 'virtual:world', not found Package gtk+-3.0 was not found in the pkg-config search path. Perhaps you should add the directory containing
gtk±3.0.pc’ to the PKG_CONFIG_PATH environment variable Package ‘gtk±3.0’, required by ‘virtual:world’, not found hellow.c:1:10: fatal error: gtk/gtk.h: No such file or directory 1 | #include <gtk/gtk.h> | ^~~~~~~~~~~ compilation terminated.
NOTE 2 : to solve the previous problem, i use this bash( gtk3-run-example.sh ), attached also to this email.
#!/bin/sh
# srcdir=`dirname $0`
# echo "directorio : $srcdir"
export PKG_CONFIG_PATH=/mingw32/lib/pkgconfig
gcc `pkg-config --cflags gtk+-3.0` -o example-1 example-1.c `pkg-config --libs gtk+-3.0`
Current behavior
The previous command only generates a bunch of errors, that I attach as “output-error.log”
NOTE : I need to know if I miss some step or what, thanks.
Version information
- GTK version : 3
- OS version : Windows 10
Additional information
- the basic prg example-1.c used in step 5
- bash gtk3-run-example.sh used in step 5
- the output output-error.log produced in step 5