【发布时间】:2015-04-10 19:10:47
【问题描述】:
我尝试在 cpp 中调用 libxdo,如下所示:
#include <xdo.h>
int main() {
xdo_t *xdo = xdo_new(NULL);
return 0;
}
并运行g++ /home/roroco/Dropbox/try/c/try/main.cpp -lxdo,它会引发
/tmp/ccWh9hHs.o: In function `main':
main.cpp:(.text+0xe): undefined reference to `xdo_new(char const*)'
collect2: error: ld returned 1 exit status
请告诉我发生了什么?
更新:我已经安装了 libxdo,但仍然出现此错误。
【问题讨论】: