作者:
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):