PJSIP示例代码app_perror未在作用域中声明
PJSIP sample code app_perror was not declared in the scope
我正试图让PJSIP的示例代码正常工作,但在编译过程中我得到了错误:
MXC061:~$ g++ -I /usr/local/include -L/usr/local/lib -o hello gst.cpp `pkg-config
--cflags --libs libpjproject`
error: ‘app_perror’ was not declared in this scope
app_perror(THIS_FILE, "Unable to start UDP transport", status);
我知道我应该以某种方式包含库目录,但我甚至不知道app_perror()属于哪个头。
感谢您的帮助。
此错误很可能来自另一个示例文件的复制/粘贴问题。我的意思是,app_perror
是在每个样本文件上定义的,根据测试运行的不同,以不同的方式显示可能的错误,也就是说,为了解决您的错误,您需要在开始时添加它的定义,例如,在logging_on_rx_msg
:之前
static void app_perror(const char *sender, const char *title, pj_status_t status)
{
char errmsg[PJ_ERR_MSG_SIZE];
pj_strerror(status, errmsg, sizeof(errmsg));
PJ_LOG(1,(sender, "%s: %s", title, errmsg));
}
相关文章:
- 未在作用域中声明unordered_map
- 未在此作用域OpenCV3.4中声明cvSaveImage
- 未在此作用域中声明的函数和变量 (C++)
- 函数未在作用域中声明 / 如何结合使用 header.h、header.cpp 和 main.cpp?
- 重载时未在 C++ 的作用域错误中声明
- 在 C++ 中使用 "transform" 会给出一个错误,指出这未在作用域中声明
- Tictactoe 游戏变量未在作用域中声明
- 当变量在多个函数作用域中使用时,我应该在类 private 中声明该变量吗?
- 如何在C++中嵌套词法作用域可访问的作用域中声明静态信息?
- gets()未在作用域中声明
- 在C++14中,在哪个作用域中声明了重新声明枚举的非范围枚举器
- C++11 外部作用域变量声明为 auto
- 未在此作用域中声明类 (c++)
- 如何声明在函数作用域中定义的结构
- 未在此作用域中声明函数,即使存在头文件也是如此
- 变量声明中结构的作用域解析是什么意思
- 在C++中,在给定的相同作用域内声明相同的变量名
- 我可以使用相同的名称为周围作用域中的类型声明成员类型别名吗
- 类未在作用域中声明,但已声明该类
- 使用新的外部函数作用域声明和初始化变量