dongzhuo7291 2019-03-02 17:44 采纳率: 100%
浏览 96
已采纳

无法安装gotk3,收到GdkMonitor错误

I tried to use gotk3 for creating desktop application. I follow the instruction in gotk3 wiki and this installing-on-linux wiki to install it. But then I get this error while executing go get -v:

gcc errors for preamble:
In file included from ../../gotk3/gotk3/gdk/gdk_since_3_22.go:23:0:
./gdk_since_3_22.go.h:22:8: error: unknown type name 'GdkMonitor'
 static GdkMonitor *
        ^

I've tried to delete the gotk3 directory, and then trying to go get -v again, but still, it didn't work.

I also checked the GTK version that installed in my Ubuntu 16.04 using apt-cache policy libgtk2.0-0 libgtk-3-0 | grep Installed. And it shows this:

  Installed: 2.24.30-1ubuntu1.16.04.2
  Installed: 3.18.9-1ubuntu3.3

What did I do wrong? Thanks

  • 写回答

1条回答 默认 最新

  • doucu7330 2019-03-03 10:21
    关注

    GdkMonitor was introduced in GTK+ 3.22. Your version is 3.18.

    go get -tags gtk_3_18 github.com/gotk3/gotk3/gtk at the very beginning of building (see here NOTE section) should fix things

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了
  • ¥50 切换TabTip键盘的输入法
  • ¥15 可否在不同线程中调用封装数据库操作的类
  • ¥15 微带串馈天线阵列每个阵元宽度计算