Reputation: 15
hi guys i try to run Msys2 and GTK in windows 10 i follow this installation
https://www.gtk.org/docs/installations/windows
when i'am arrived at step 5 ,pacman -S mingw-w64-x86_64-toolchain base-devel , i install all packet
i tested installation , but return me:
gcc -o main.c -pthread pkg-config --cflags --libs gtk+-3.0
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
No package 'gtk+-3.0' found
bash: gcc: command not found
i add in my windows envairoment variable in the system this path
PKG_CONFIG_PATH
C:\msys64\mingw64\lib\pkgconfig
and i insert in all my .bashrc
this code export PKG_CONFIG_PATH=/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig
but nothing return me always the same error
anyone can help me ? or have some suggestions , thanks
Upvotes: 0
Views: 3590
Reputation: 4619
In case this might help you or somebody else: I've had the same problem happen in a build using MSYS2 - not for GTK3 but for a bunch of different libraries. The PKG_CONFIG_PATH
was definitely exported correctly and its path was also correct but pkg-config
would stubbornly search in its default search paths instead of the ones provided outside of the MSYS2 install. I tried export
ing the variable and setting it through the .bashrc
file but that got me nowhere.
I'm not fully sure why it works but, reading through some old company internal docs, I read that installing the dos2unix
utility automagically fixed the problem and it did work for me. Install it using pacman -S dos2unix
. You might want to update your package list first with pacman -Syu
to have up to date packages.
Upvotes: 0
Reputation: 87396
The instructions you linked to say to install the mingw-w64-x86_64-gtk3
package. That is a package for the 64-bit MinGW environment provided by MSYS2. Therefore, to use it, you must start MSYS2 by running mingw64.exe from the MSYS2 installation directory, or using the corresopnding shortcut in your start menu. You can type echo $MSYSTEM
and if it returns MINGW64
then you are using the right environemnt. You should not need to edit PKG_CONFIG_PATH
yourself in your .bashrc
.
Upvotes: 2