admin管理员组文章数量:1025278
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.
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-
Two points: 1. You do not need two versions at once. Just
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 - gtk-dotnet-2.0 Gtk.DotNet - .NET Extensions for Gtk gtk-sharp-2.0 Gtk - Gtk gtk4 GTK - GTK Graphical UI Library gtk4-unix-print GTK - GTK Unix print support gtk4-wayland GTK - GTK Graphical UI Library gtk4-x11 GTK - GTK Graphical UI Library Strange, although not needed I thought we could have multiple versions installed? Ah well. I did find an anser, Ill add it in a sec. – RandomUser Commented Nov 18, 2024 at 20:04
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.
本文标签: cCan39t compile beginners tutorial for GTK on Ubuntu 2204Stack Overflow
版权声明:本文标题:c# - Can't compile beginners tutorial for GTK on Ubuntu 22.04 - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745614253a2159189.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