This is my first stack post, so five me if the formatting etc's a bit off. Im following the beginners GTK tutorial near the end of this page Same issue mentioned here, except those users are on windows.
When I put mcs hello.cs -pkg:gtk-sharp-2.0 into the terminal, I get
Package gtk-sharp-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk-sharp-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk-sharp-2.0' found
error CS8027: Error running pkg-config. Check the above output.
I went on to try installing GTK 3 and 4 using:
sudo apt install libgtk-3-dev
sudo apt install libgtk-4-dev
sudo apt-get update
And tried the previous command with different versions, same output. Using dpkg -s libgtk-3-0 | grep 'Version' shows a version for GTK3, but says V 2 and 4 are not installed.
Im finding more info about pkg-config, and where gtk-sharp should be.
Looking all over the internet and youtube, I noticed references to GTK, GTK+, GTK# etc, have I installed the wrong thing altogether?
This is my first stack post, so five me if the formatting etc's a bit off. Im following the beginners GTK tutorial near the end of this page Same issue mentioned here, except those users are on windows.
When I put mcs hello.cs -pkg:gtk-sharp-2.0 into the terminal, I get
Package gtk-sharp-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk-sharp-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk-sharp-2.0' found
error CS8027: Error running pkg-config. Check the above output.
I went on to try installing GTK 3 and 4 using:
sudo apt install libgtk-3-dev
sudo apt install libgtk-4-dev
sudo apt-get update
And tried the previous command with different versions, same output. Using dpkg -s libgtk-3-0 | grep 'Version' shows a version for GTK3, but says V 2 and 4 are not installed.
Im finding more info about pkg-config, and where gtk-sharp should be.
Looking all over the internet and youtube, I noticed references to GTK, GTK+, GTK# etc, have I installed the wrong thing altogether?
Share Improve this question edited Nov 18, 2024 at 15:27 millerluki 3282 silver badges11 bronze badges asked Nov 18, 2024 at 13:27 RandomUserRandomUser 113 bronze badges 2 |1 Answer
Reset to default 0After reading a lot more I realised GTK, GTK+ and GTK# seem have some different components. I needed to specifically install GTK#, which I did with:
sudo apt install gtk-sharp2
The test script now builds with MCS. Hopefully that’s everything setup and good to go.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745614254a4636134.html
libgtk-4-dev
is enough. 2. Package name as it is known toapt
andpkg-config
differ. To see how the library is known topkg-config
, dopkg-config --list-all | grep gtk
It will print all gtk related packages. – White Owl Commented Nov 18, 2024 at 14:37