[问题] 找不到函数的函示库vtysh

楼主: devcc (游侠)   2022-11-25 23:35:58
开发平台(Platform): (Ex: Win10, Linux, ...)
Win11下的Linux
编译器(Ex: GCC, clang, VC++...)+目标环境(跟开发平台不同的话需列出)
WSL
额外使用到的函数库(Library Used): (Ex: OpenGL, ...)
问题(Question):
我想写一个能够用vtysh command来记录所有cmd
但是函示库找不到用哪个
不知道我程式哪有问题
喂入的资料(Input):
预期的正确结果(Expected Output):
错误结果(Wrong Output):
vtysh.c:2:10: fatal error: zebra.h: No such file or directory
2 | #include <zebra.h>
| ^~~~~~~~~
compilation terminated.
程式码(Code):(请善用置底文网页, 记得排版,禁止使用图档)
#include <stdio.h>
#include <zebra.h>
int main(int argc,char** argv)
{
char *cmd = argv[1];
vtysh_execute(cmd);
printf("%d , cmd: %s %s\n", argc, cmd, argv[2]);
return 0;
}
补充说明(Supplement):
作者: wulouise (在线上!=在电脑前)   2022-11-25 23:43:00
我没用过,但是为什么不是#include <vtysh.h>?先找怎么装zebra的package,装完应该会顺便帮你装header你知道你要用的这个header是属于哪个lib吗...apt-get install quagga先试试...看有没有用过的人能帮
作者: breeze08 (linuxer)   2022-11-26 01:01:00
sudo apt install libpacklib1-dev
作者: Dracarys (MayShowGunMore)   2022-11-26 18:36:00
用-v看这lib有没有在include path吧……
作者: lc85301 (pomelocandy)   2022-11-28 12:29:00
小 google 一下应该是 zebra.h

Links booklink

Contact Us: admin [ a t ] ucptt.com