我想用 CMake 编译一个依赖 libappindicator 的 Vala 项目。
但是,使用此输出进行中止:
Linking C executable calm
CMakeFiles/calm.dir/src/CalmWindow.c.o: In function `__lambda6_':
CalmWindow.c:(.text+0x5b8): undefined reference to `app_indicator_set_status'
CMakeFiles/calm.dir/src/CalmWindow.c.o: In function `calm_calm_indicator_construct':
CalmWindow.c:(.text+0x6ee): undefined reference to `app_indicator_new'
CalmWindow.c:(.text+0x746): undefined reference to `app_indicator_set_status'
CalmWindow.c:(.text+0x76c): undefined reference to `app_indicator_set_attention_icon'
CalmWindow.c:(.text+0xe87): undefined reference to `app_indicator_set_menu'
collect2: ld gab 1 als Ende-Status zurück
make[2]: *** [calm] Fehler 1
make[1]: *** [CMakeFiles/calm.dir/all] Fehler 2
make: *** [all] Fehler 2
我的 CMakeLists.txt 有问题吗?
此命令有效:
valac -g --pkg gtk+-3.0 --pkg gstreamer-0.10 --pkg gstreamer-audio-0.10 --pkg granite --pkg appindicator3-0.1 CalmApp.vala Calm.vala CalmWindow.vala