문제

I am trying to get the sample code of PJSIP to work but during compilation i get the error:

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);

i know that i should somehow include the library directory but i don't even know which header app_perror() belongs to.

Any help is appreciated.

도움이 되었습니까?

해결책

Most probably this error comes from a copy/paste problem from another sample file. I mean, app_perror is defined on every sample file to show possible errors in different ways depending on test running, this is, for solving your error, you would need to add its definition, initially, at the beginning, for example, before 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));
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top