getlantern / systray

a cross platfrom Go library to place an icon and menu in the notification area
Apache License 2.0
3.19k stars 441 forks source link

systray_linux.c:7:10: fatal error: libappindicator/app-indicator.h: 没有那个文件或目录 #230

Closed Sudiaty closed 2 years ago

Sudiaty commented 2 years ago

OS env

Linux version 5.10.83-amd64-desktop (Uos 8.3.0.6-1+dde) 8.3.0, GNU ld

I have installed gcc libgtk-3-dev libayatana-appindicator3-dev. But ayatana-appindicator3-0.1.pc is founded instead of appindicator3-0.1.pc. So I exected ln ayatana-appindicator3-0.1.pc appindicator3-0.1.pc. Then I got following error while building.

GOROOT=/usr/lib/go-1.15 #gosetup
GOPATH=/home/sinoc/go #gosetup
/usr/lib/go-1.15/bin/go build -o /tmp/GoLand/___go_build_gotray -gcflags all=-N -l gotray #gosetup
# github.com/getlantern/systray
systray_linux.c:7:10: fatal error: libappindicator/app-indicator.h: 没有那个文件或目录
 #include <libappindicator/app-indicator.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Sudiaty commented 2 years ago
 sudo apt install libappindicator3-dev gir1.2-appindicator3-0.1