Link error

RB
Rachel Baskaran
Thu, Sep 10, 2009 2:44 PM

Hey,

I think this below error is a link error:

Undefined reference to 'pjsua_invite'.

I run pjproject-1.3  with GNU compiler. I checked all the libraries, but
still I get this error.

How to solve it?

Any help!

Thanks!

Hey, I think this below error is a *link error*: Undefined reference to 'pjsua_invite'. I run pjproject-1.3 with GNU compiler. I checked all the libraries, but still I get this error. How to solve it? Any help! Thanks!
JG
John Graham
Thu, Sep 10, 2009 2:55 PM

Can you post some more information? A copy & paste of (1) the command
you run that generates the error, (2) the last, say, 50 lines of
output (more if you think it'll help) will help greatly!  Also, what
architecture are you building on? Are you cross-compiling?

John G

On Thu, Sep 10, 2009 at 3:44 PM, Rachel Baskaran
rachelbaskaran@gmail.com wrote:

Hey,

I think this below error is a link error:

Undefined reference to 'pjsua_invite'.

I run pjproject-1.3  with GNU compiler. I checked all the libraries, but
still I get this error.

How to solve it?

Any help!

Thanks!


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

Can you post some more information? A copy & paste of (1) the command you run that generates the error, (2) the last, say, 50 lines of output (more if you think it'll help) will help greatly! Also, what architecture are you building on? Are you cross-compiling? John G On Thu, Sep 10, 2009 at 3:44 PM, Rachel Baskaran <rachelbaskaran@gmail.com> wrote: > Hey, > > I think this below error is a link error: > > Undefined reference to 'pjsua_invite'. > > I run pjproject-1.3  with GNU compiler. I checked all the libraries, but > still I get this error. > > How to solve it? > > Any help! > > Thanks! > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > >
RB
Rachel Baskaran
Thu, Sep 10, 2009 3:16 PM

The script I run:( I highlighted the command where it shows the error )

#include <pjsua-lib/pjsua.h>
#include "getopt.h"
#include <stdlib.h>

#define THIS_FILE "rach.c"

#define SIP_DOMAIN "example.com"
#define SIP_USER  "rachel"
#define SIP_PASSWD "secret"

static pjsip_inv_session *inv_session;

/* Notify UI when invite state has changed */

void pjsua_ui_inv_on_state_changed(pjsip_inv_session *inv, pjsip_event *e)
{
const char *state_names[] =
{
"NULL", "CALLING",
"INCOMING","EARLY","CONNECTING","CONFIRMED","DISCONNECTED","TERMINATED"};

PJ_UNUSED_ARG(e);

PJ_LOG(3,(THIS_FILE, "Invite session state changed to %s",
state_names[inv->state]));

if(inv->state == PJSIP_INV_STATE_DISCONNECTED) {

if(inv == inv_session)
inv_session = NULL;
}
else
{
inv_session = inv;
}
}

static void ui_help(void)
{
puts("");
puts("Console keys:");
puts("m  Make a call/another call");
puts("a Answer incoming call");
puts("h Hangup current call");
puts("q Quit");
puts("");
fflush(stdout);
}

static pj_bool_t input(const char *title,char *buf, pj_size_t len)
{
char *p;

printf("%s (empty to cancel):", title);
fflush(stdout);
fgets(buf, len, stdin);

/* Remove newlines */
for(p=buf; ;++p)
{
if(*p =='\r' || *p =='\n') *p='\0';
else if(!*p)
break;
}

if(!*buf)
return PJ_FALSE;
return PJ_TRUE;
}

static void error_exit(const char *title, pj_status_t status)
{
pjsua_perror(THIS_FILE, title, status);
pjsua_destroy();
exit(1);
}

static void ui_console_main(void)
{
char buf[128];
pjsip_inv_session *inv;

//ui_help();

for(;;)
{

ui_help();
fgets(buf, sizeof(buf), stdin);

switch (buf[0]) {

case 'm':
if(inv_session != NULL) {
puts("Can not make call while another one is in progress");
fflush(stdout);
continue;
}

#if 1

/* Make call!: */
if(!input("Enter URL to call", buf, sizeof(buf)))
continue;

pjsua_invite(buf, &inv);

#else

pjsua_invite("sip:localhost:5061", &inv);

#endif

break;

case 'a':

if(inv_session == NULL || inv_session->role != PJSIP_ROLE_UAS ||
inv_session->state >= PJSIP_INV_STATE_CONNECTING)
{
puts("No pending incoming call");
fflush(stdout);
continue;
}

else
{
pj_status_t status;
pjsip_tx_data *tdata;

if(!input("Answer with code (100-699)", buf, sizeof(buf)))
continue;

status = pjsip_inv_answer(inv_session, atoi(buf) ,NULL,NULL, &tdata);
if(status == PJ_SUCCESS)
status = pjsip_inv_send_msg(inv_session, tdata);

if(status != PJ_SUCCESS)
error_exit("Unable to create/send response", status);
}

break;

case 'h':

if(inv_session == NULL) {
puts("No current call");
fflush(stdout);
continue;
}
else
{

pj_status_t status;
pjsip_tx_data *tdata;

status = pjsip_inv_end_session(inv_session, PJSIP_SC_DECLINE, NULL, &tdata);
if(status != PJ_SUCCESS) {
error_exit("Failed to create end session message", status);
continue;
}

status = pjsip_inv_send_msg(inv_session, tdata);
if(status != PJ_SUCCESS) {
error_exit("Failed to send end session message", status);
continue;
}
}

break;

case 'q':
goto on_exit;
}
}
on_exit:
;

All I want my script to do is call the specified URL in* else* part( when
they run the script ) or when I press 'm' call the URL I enter. This just
the part of code. It registers to example.com( since it's test after few
mins it says timeout )

The only line on my shell prompt is:
output/rach-i686-pc-mingw32/rach.o:rach.c(.text+0x4cf): Undefined reference
to 'pjsua_invite'.

All I did when I downloaded the source from pjsip.org, is installed GNU
compiler( Mingw, msys ) and in shell prompt gave the below command:
cd C:/pjproject-1.3
./configure
./make dep && make clean && make

To run the pjsua:
cd pjproject-1.3/pjsip-apps/bin
./pjsua-i686-pc-mingw32
and that ran the pjsua_app.

Since I need a script to suit my requirement I went to write my own.

It would be great if you'll help me out.

Thanks!

On Thu, Sep 10, 2009 at 10:55 AM, John Graham <
johngavingraham@googlemail.com> wrote:

Can you post some more information? A copy & paste of (1) the command
you run that generates the error, (2) the last, say, 50 lines of
output (more if you think it'll help) will help greatly!  Also, what
architecture are you building on? Are you cross-compiling?

John G

On Thu, Sep 10, 2009 at 3:44 PM, Rachel Baskaran
rachelbaskaran@gmail.com wrote:

Hey,

I think this below error is a link error:

Undefined reference to 'pjsua_invite'.

I run pjproject-1.3  with GNU compiler. I checked all the libraries, but
still I get this error.

How to solve it?

Any help!

Thanks!


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

The script I run:( I highlighted the command where it shows the error ) #include <pjsua-lib/pjsua.h> #include "getopt.h" #include <stdlib.h> #define THIS_FILE "rach.c" #define SIP_DOMAIN "example.com" #define SIP_USER "rachel" #define SIP_PASSWD "secret" static pjsip_inv_session *inv_session; /* Notify UI when invite state has changed */ void pjsua_ui_inv_on_state_changed(pjsip_inv_session *inv, pjsip_event *e) { const char *state_names[] = { "NULL", "CALLING", "INCOMING","EARLY","CONNECTING","CONFIRMED","DISCONNECTED","TERMINATED"}; PJ_UNUSED_ARG(e); PJ_LOG(3,(THIS_FILE, "Invite session state changed to %s", state_names[inv->state])); if(inv->state == PJSIP_INV_STATE_DISCONNECTED) { if(inv == inv_session) inv_session = NULL; } else { inv_session = inv; } } static void ui_help(void) { puts(""); puts("Console keys:"); puts("m Make a call/another call"); puts("a Answer incoming call"); puts("h Hangup current call"); puts("q Quit"); puts(""); fflush(stdout); } static pj_bool_t input(const char *title,char *buf, pj_size_t len) { char *p; printf("%s (empty to cancel):", title); fflush(stdout); fgets(buf, len, stdin); /* Remove newlines */ for(p=buf; ;++p) { if(*p =='\r' || *p =='\n') *p='\0'; else if(!*p) break; } if(!*buf) return PJ_FALSE; return PJ_TRUE; } static void error_exit(const char *title, pj_status_t status) { pjsua_perror(THIS_FILE, title, status); pjsua_destroy(); exit(1); } static void ui_console_main(void) { char buf[128]; pjsip_inv_session *inv; //ui_help(); for(;;) { ui_help(); fgets(buf, sizeof(buf), stdin); switch (buf[0]) { case 'm': if(inv_session != NULL) { puts("Can not make call while another one is in progress"); fflush(stdout); continue; } #if 1 /* Make call!: */ if(!input("Enter URL to call", buf, sizeof(buf))) continue; *pjsua_invite*(buf, &inv); #else *pjsua_invite*("sip:localhost:5061", &inv); #endif break; case 'a': if(inv_session == NULL || inv_session->role != PJSIP_ROLE_UAS || inv_session->state >= PJSIP_INV_STATE_CONNECTING) { puts("No pending incoming call"); fflush(stdout); continue; } else { pj_status_t status; pjsip_tx_data *tdata; if(!input("Answer with code (100-699)", buf, sizeof(buf))) continue; status = pjsip_inv_answer(inv_session, atoi(buf) ,NULL,NULL, &tdata); if(status == PJ_SUCCESS) status = pjsip_inv_send_msg(inv_session, tdata); if(status != PJ_SUCCESS) error_exit("Unable to create/send response", status); } break; case 'h': if(inv_session == NULL) { puts("No current call"); fflush(stdout); continue; } else { pj_status_t status; pjsip_tx_data *tdata; status = pjsip_inv_end_session(inv_session, PJSIP_SC_DECLINE, NULL, &tdata); if(status != PJ_SUCCESS) { error_exit("Failed to create end session message", status); continue; } status = pjsip_inv_send_msg(inv_session, tdata); if(status != PJ_SUCCESS) { error_exit("Failed to send end session message", status); continue; } } break; case 'q': goto on_exit; } } on_exit: ; All I want my script to do is call the specified URL in* else* part( when they run the script ) or when I press 'm' call the URL I enter. This just the part of code. It registers to example.com( since it's test after few mins it says timeout ) The only line on my shell prompt is: output/rach-i686-pc-mingw32/rach.o:rach.c(.text+0x4cf): Undefined reference to 'pjsua_invite'. All I did when I downloaded the source from pjsip.org, is installed GNU compiler( Mingw, msys ) and in shell prompt gave the below command: cd C:/pjproject-1.3 ./configure ./make dep && make clean && make To run the pjsua: cd pjproject-1.3/pjsip-apps/bin ./pjsua-i686-pc-mingw32 and that ran the pjsua_app. Since I need a script to suit my requirement I went to write my own. It would be great if you'll help me out. Thanks! On Thu, Sep 10, 2009 at 10:55 AM, John Graham < johngavingraham@googlemail.com> wrote: > Can you post some more information? A copy & paste of (1) the command > you run that generates the error, (2) the last, say, 50 lines of > output (more if you think it'll help) will help greatly! Also, what > architecture are you building on? Are you cross-compiling? > > John G > > > > On Thu, Sep 10, 2009 at 3:44 PM, Rachel Baskaran > <rachelbaskaran@gmail.com> wrote: > > Hey, > > > > I think this below error is a link error: > > > > Undefined reference to 'pjsua_invite'. > > > > I run pjproject-1.3 with GNU compiler. I checked all the libraries, but > > still I get this error. > > > > How to solve it? > > > > Any help! > > > > Thanks! > > > > _______________________________________________ > > Visit our blog: http://blog.pjsip.org > > > > pjsip mailing list > > pjsip@lists.pjsip.org > > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > > > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >
JG
John Graham
Thu, Sep 10, 2009 3:31 PM

What's the command-line when you compile? Are you compiling with -Wall
and -Werror?

Grepping through my include/ and lib/ directories for pjproject-1.3, I
can't find a function in any header file or object in any of the
libraries called pjsua_invite - if you compiled without -Werror, the
compiler probably only spat out a warning of an implicit declaration
and left the error for the linker to find. Try recompiling with
-Werror or just search for warnings to this effect.

I've not used past versions of this library - could this be a function
you're using from an old API?

John G

On Thu, Sep 10, 2009 at 4:16 PM, Rachel Baskaran
rachelbaskaran@gmail.com wrote:

The script I run:( I highlighted the command where it shows the error )

#include <pjsua-lib/pjsua.h>
#include "getopt.h"
#include <stdlib.h>

#define THIS_FILE "rach.c"

#define SIP_DOMAIN "example.com"
#define SIP_USER   "rachel"
#define SIP_PASSWD "secret"

static pjsip_inv_session *inv_session;

/* Notify UI when invite state has changed */

void pjsua_ui_inv_on_state_changed(pjsip_inv_session *inv, pjsip_event *e)
{
const char *state_names[] =
{
"NULL", "CALLING",
"INCOMING","EARLY","CONNECTING","CONFIRMED","DISCONNECTED","TERMINATED"};

PJ_UNUSED_ARG(e);

PJ_LOG(3,(THIS_FILE, "Invite session state changed to %s",
state_names[inv->state]));

if(inv->state == PJSIP_INV_STATE_DISCONNECTED) {

if(inv == inv_session)
inv_session = NULL;
}
else
{
inv_session = inv;
}
}

static void ui_help(void)
{
puts("");
puts("Console keys:");
puts("m  Make a call/another call");
puts("a Answer incoming call");
puts("h Hangup current call");
puts("q Quit");
puts("");
fflush(stdout);
}

static pj_bool_t input(const char *title,char *buf, pj_size_t len)
{
char *p;

printf("%s (empty to cancel):", title);
fflush(stdout);
fgets(buf, len, stdin);

/* Remove newlines */
for(p=buf; ;++p)
{
if(*p =='\r' || *p =='\n') *p='\0';
else if(!*p)
break;
}

if(!*buf)
return PJ_FALSE;
return PJ_TRUE;
}

static void error_exit(const char *title, pj_status_t status)
{
pjsua_perror(THIS_FILE, title, status);
pjsua_destroy();
exit(1);
}

static void ui_console_main(void)
{
char buf[128];
pjsip_inv_session *inv;

//ui_help();

for(;;)
{

ui_help();
fgets(buf, sizeof(buf), stdin);

switch (buf[0]) {

case 'm':
if(inv_session != NULL) {
puts("Can not make call while another one is in progress");
fflush(stdout);
continue;
}

#if 1

   /* Make call!: */
if(!input("Enter URL to call", buf, sizeof(buf)))
continue;

pjsua_invite(buf, &inv);

#else

pjsua_invite("sip:localhost:5061", &inv);

#endif

    break;

case 'a':

if(inv_session == NULL || inv_session->role != PJSIP_ROLE_UAS ||
inv_session->state >= PJSIP_INV_STATE_CONNECTING)
{
puts("No pending incoming call");
fflush(stdout);
continue;
}

else
{
pj_status_t status;
pjsip_tx_data *tdata;

if(!input("Answer with code (100-699)", buf, sizeof(buf)))
continue;

status = pjsip_inv_answer(inv_session, atoi(buf) ,NULL,NULL, &tdata);
if(status == PJ_SUCCESS)
status = pjsip_inv_send_msg(inv_session, tdata);

if(status != PJ_SUCCESS)
error_exit("Unable to create/send response", status);
}

break;

case 'h':

if(inv_session == NULL) {
puts("No current call");
fflush(stdout);
continue;
}
else
{

pj_status_t status;
pjsip_tx_data *tdata;

status = pjsip_inv_end_session(inv_session, PJSIP_SC_DECLINE, NULL, &tdata);
if(status != PJ_SUCCESS) {
error_exit("Failed to create end session message", status);
continue;
}

status = pjsip_inv_send_msg(inv_session, tdata);
if(status != PJ_SUCCESS) {
error_exit("Failed to send end session message", status);
continue;
}
}

break;

case 'q':
goto on_exit;
}
}
on_exit:
;

All I want my script to do is call the specified URL in else part( when they
run the script ) or when I press 'm' call the URL I enter. This just the
part of code. It registers to example.com( since it's test after few mins it
says timeout )

The only line on my shell prompt is:
output/rach-i686-pc-mingw32/rach.o:rach.c(.text+0x4cf): Undefined reference
to 'pjsua_invite'.

All I did when I downloaded the source from pjsip.org, is installed GNU
compiler( Mingw, msys ) and in shell prompt gave the below command:
cd C:/pjproject-1.3
./configure
./make dep && make clean && make

To run the pjsua:
cd pjproject-1.3/pjsip-apps/bin
./pjsua-i686-pc-mingw32
and that ran the pjsua_app.

Since I need a script to suit my requirement I went to write my own.

It would be great if you'll help me out.

Thanks!

On Thu, Sep 10, 2009 at 10:55 AM, John Graham
johngavingraham@googlemail.com wrote:

Can you post some more information? A copy & paste of (1) the command
you run that generates the error, (2) the last, say, 50 lines of
output (more if you think it'll help) will help greatly!  Also, what
architecture are you building on? Are you cross-compiling?

John G

On Thu, Sep 10, 2009 at 3:44 PM, Rachel Baskaran
rachelbaskaran@gmail.com wrote:

Hey,

I think this below error is a link error:

Undefined reference to 'pjsua_invite'.

I run pjproject-1.3  with GNU compiler. I checked all the libraries, but
still I get this error.

How to solve it?

Any help!

Thanks!


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

What's the command-line when you compile? Are you compiling with -Wall and -Werror? Grepping through my include/ and lib/ directories for pjproject-1.3, I can't find a function in any header file or object in any of the libraries called pjsua_invite - if you compiled without -Werror, the compiler probably only spat out a warning of an implicit declaration and left the error for the linker to find. Try recompiling with -Werror or just search for warnings to this effect. I've not used past versions of this library - could this be a function you're using from an old API? John G On Thu, Sep 10, 2009 at 4:16 PM, Rachel Baskaran <rachelbaskaran@gmail.com> wrote: > The script I run:( I highlighted the command where it shows the error ) > > #include <pjsua-lib/pjsua.h> > #include "getopt.h" > #include <stdlib.h> > > > #define THIS_FILE "rach.c" > > #define SIP_DOMAIN "example.com" > #define SIP_USER   "rachel" > #define SIP_PASSWD "secret" > > > > > static pjsip_inv_session *inv_session; > > > /* Notify UI when invite state has changed */ > > void pjsua_ui_inv_on_state_changed(pjsip_inv_session *inv, pjsip_event *e) > { > const char *state_names[] = > { > "NULL", "CALLING", > "INCOMING","EARLY","CONNECTING","CONFIRMED","DISCONNECTED","TERMINATED"}; > > PJ_UNUSED_ARG(e); > > PJ_LOG(3,(THIS_FILE, "Invite session state changed to %s", > state_names[inv->state])); > > if(inv->state == PJSIP_INV_STATE_DISCONNECTED) { > > if(inv == inv_session) > inv_session = NULL; > } > else > { > inv_session = inv; > } > } > > > static void ui_help(void) > { > puts(""); > puts("Console keys:"); > puts("m  Make a call/another call"); > puts("a Answer incoming call"); > puts("h Hangup current call"); > puts("q Quit"); > puts(""); > fflush(stdout); > } > > static pj_bool_t input(const char *title,char *buf, pj_size_t len) > { > char *p; > > printf("%s (empty to cancel):", title); > fflush(stdout); > fgets(buf, len, stdin); > > /* Remove newlines */ > for(p=buf; ;++p) > { > if(*p =='\r' || *p =='\n') *p='\0'; > else if(!*p) > break; > } > > if(!*buf) > return PJ_FALSE; > return PJ_TRUE; > } > > > > > static void error_exit(const char *title, pj_status_t status) > { > pjsua_perror(THIS_FILE, title, status); > pjsua_destroy(); > exit(1); > } > > > > > > static void ui_console_main(void) > { > char buf[128]; > pjsip_inv_session *inv; > > > //ui_help(); > > for(;;) > { > > ui_help(); > fgets(buf, sizeof(buf), stdin); > > switch (buf[0]) { > > case 'm': > if(inv_session != NULL) { > puts("Can not make call while another one is in progress"); > fflush(stdout); > continue; > } > > #if 1 > >    /* Make call!: */ > if(!input("Enter URL to call", buf, sizeof(buf))) > continue; > > pjsua_invite(buf, &inv); > > #else > > pjsua_invite("sip:localhost:5061", &inv); > > #endif > >     break; > > > > case 'a': > > if(inv_session == NULL || inv_session->role != PJSIP_ROLE_UAS || > inv_session->state >= PJSIP_INV_STATE_CONNECTING) > { > puts("No pending incoming call"); > fflush(stdout); > continue; > } > > else > { > pj_status_t status; > pjsip_tx_data *tdata; > > if(!input("Answer with code (100-699)", buf, sizeof(buf))) > continue; > > > > status = pjsip_inv_answer(inv_session, atoi(buf) ,NULL,NULL, &tdata); > if(status == PJ_SUCCESS) > status = pjsip_inv_send_msg(inv_session, tdata); > > if(status != PJ_SUCCESS) > error_exit("Unable to create/send response", status); > } > > break; > > case 'h': > > if(inv_session == NULL) { > puts("No current call"); > fflush(stdout); > continue; > } > else > { > > pj_status_t status; > pjsip_tx_data *tdata; > > > status = pjsip_inv_end_session(inv_session, PJSIP_SC_DECLINE, NULL, &tdata); > if(status != PJ_SUCCESS) { > error_exit("Failed to create end session message", status); > continue; > } > > status = pjsip_inv_send_msg(inv_session, tdata); > if(status != PJ_SUCCESS) { > error_exit("Failed to send end session message", status); > continue; > } > } > > break; > > case 'q': > goto on_exit; > } > } > on_exit: > ; > > All I want my script to do is call the specified URL in else part( when they > run the script ) or when I press 'm' call the URL I enter. This just the > part of code. It registers to example.com( since it's test after few mins it > says timeout ) > > The only line on my shell prompt is: > output/rach-i686-pc-mingw32/rach.o:rach.c(.text+0x4cf): Undefined reference > to 'pjsua_invite'. > > All I did when I downloaded the source from pjsip.org, is installed GNU > compiler( Mingw, msys ) and in shell prompt gave the below command: > cd C:/pjproject-1.3 > ./configure > ./make dep && make clean && make > > To run the pjsua: > cd pjproject-1.3/pjsip-apps/bin > ./pjsua-i686-pc-mingw32 > and that ran the pjsua_app. > > Since I need a script to suit my requirement I went to write my own. > > It would be great if you'll help me out. > > Thanks! > > > > On Thu, Sep 10, 2009 at 10:55 AM, John Graham > <johngavingraham@googlemail.com> wrote: >> >> Can you post some more information? A copy & paste of (1) the command >> you run that generates the error, (2) the last, say, 50 lines of >> output (more if you think it'll help) will help greatly!  Also, what >> architecture are you building on? Are you cross-compiling? >> >> John G >> >> >> >> On Thu, Sep 10, 2009 at 3:44 PM, Rachel Baskaran >> <rachelbaskaran@gmail.com> wrote: >> > Hey, >> > >> > I think this below error is a link error: >> > >> > Undefined reference to 'pjsua_invite'. >> > >> > I run pjproject-1.3  with GNU compiler. I checked all the libraries, but >> > still I get this error. >> > >> > How to solve it? >> > >> > Any help! >> > >> > Thanks! >> > >> > _______________________________________________ >> > Visit our blog: http://blog.pjsip.org >> > >> > pjsip mailing list >> > pjsip@lists.pjsip.org >> > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >> > >> > >> >> _______________________________________________ >> Visit our blog: http://blog.pjsip.org >> >> pjsip mailing list >> pjsip@lists.pjsip.org >> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > >
RB
Rachel Baskaran
Thu, Sep 10, 2009 3:57 PM

The way I compile my script:
cd C:/pjproject-1.3
make

If successful, it places the executable in
(pjsip-apps/bin/rach/i686-pc-mingw32)
as rach.exe and when I run the exe it registers blah blah...

I'm not aware about the command to compile with -Wall and -Werror?

How I give the command after cd C:/pjproject-1.3? And if the warning or
error still exists how to solve it?

Thanks!

On Thu, Sep 10, 2009 at 11:31 AM, John Graham <
johngavingraham@googlemail.com> wrote:

What's the command-line when you compile? Are you compiling with -Wall
and -Werror?

Grepping through my include/ and lib/ directories for pjproject-1.3, I
can't find a function in any header file or object in any of the
libraries called pjsua_invite - if you compiled without -Werror, the
compiler probably only spat out a warning of an implicit declaration
and left the error for the linker to find. Try recompiling with
-Werror or just search for warnings to this effect.

I've not used past versions of this library - could this be a function
you're using from an old API?

John G

On Thu, Sep 10, 2009 at 4:16 PM, Rachel Baskaran
rachelbaskaran@gmail.com wrote:

The script I run:( I highlighted the command where it shows the error )

#include <pjsua-lib/pjsua.h>
#include "getopt.h"
#include <stdlib.h>

#define THIS_FILE "rach.c"

#define SIP_DOMAIN "example.com"
#define SIP_USER  "rachel"
#define SIP_PASSWD "secret"

static pjsip_inv_session *inv_session;

/* Notify UI when invite state has changed */

void pjsua_ui_inv_on_state_changed(pjsip_inv_session *inv, pjsip_event

*e)

{
const char *state_names[] =
{
"NULL", "CALLING",
"INCOMING","EARLY","CONNECTING","CONFIRMED","DISCONNECTED","TERMINATED"};

PJ_UNUSED_ARG(e);

PJ_LOG(3,(THIS_FILE, "Invite session state changed to %s",
state_names[inv->state]));

if(inv->state == PJSIP_INV_STATE_DISCONNECTED) {

if(inv == inv_session)
inv_session = NULL;
}
else
{
inv_session = inv;
}
}

static void ui_help(void)
{
puts("");
puts("Console keys:");
puts("m  Make a call/another call");
puts("a Answer incoming call");
puts("h Hangup current call");
puts("q Quit");
puts("");
fflush(stdout);
}

static pj_bool_t input(const char *title,char *buf, pj_size_t len)
{
char *p;

printf("%s (empty to cancel):", title);
fflush(stdout);
fgets(buf, len, stdin);

/* Remove newlines */
for(p=buf; ;++p)
{
if(*p =='\r' || *p =='\n') *p='\0';
else if(!*p)
break;
}

if(!*buf)
return PJ_FALSE;
return PJ_TRUE;
}

static void error_exit(const char *title, pj_status_t status)
{
pjsua_perror(THIS_FILE, title, status);
pjsua_destroy();
exit(1);
}

static void ui_console_main(void)
{
char buf[128];
pjsip_inv_session *inv;

//ui_help();

for(;;)
{

ui_help();
fgets(buf, sizeof(buf), stdin);

switch (buf[0]) {

case 'm':
if(inv_session != NULL) {
puts("Can not make call while another one is in progress");
fflush(stdout);
continue;
}

#if 1

/* Make call!: */

if(!input("Enter URL to call", buf, sizeof(buf)))
continue;

pjsua_invite(buf, &inv);

#else

pjsua_invite("sip:localhost:5061", &inv);

#endif

 break;

case 'a':

if(inv_session == NULL || inv_session->role != PJSIP_ROLE_UAS ||
inv_session->state >= PJSIP_INV_STATE_CONNECTING)
{
puts("No pending incoming call");
fflush(stdout);
continue;
}

else
{
pj_status_t status;
pjsip_tx_data *tdata;

if(!input("Answer with code (100-699)", buf, sizeof(buf)))
continue;

status = pjsip_inv_answer(inv_session, atoi(buf) ,NULL,NULL, &tdata);
if(status == PJ_SUCCESS)
status = pjsip_inv_send_msg(inv_session, tdata);

if(status != PJ_SUCCESS)
error_exit("Unable to create/send response", status);
}

break;

case 'h':

if(inv_session == NULL) {
puts("No current call");
fflush(stdout);
continue;
}
else
{

pj_status_t status;
pjsip_tx_data *tdata;

status = pjsip_inv_end_session(inv_session, PJSIP_SC_DECLINE, NULL,

&tdata);

if(status != PJ_SUCCESS) {
error_exit("Failed to create end session message", status);
continue;
}

status = pjsip_inv_send_msg(inv_session, tdata);
if(status != PJ_SUCCESS) {
error_exit("Failed to send end session message", status);
continue;
}
}

break;

case 'q':
goto on_exit;
}
}
on_exit:
;

All I want my script to do is call the specified URL in else part( when

they

run the script ) or when I press 'm' call the URL I enter. This just the
part of code. It registers to example.com( since it's test after few

mins it

says timeout )

The only line on my shell prompt is:
output/rach-i686-pc-mingw32/rach.o:rach.c(.text+0x4cf): Undefined

reference

to 'pjsua_invite'.

All I did when I downloaded the source from pjsip.org, is installed GNU
compiler( Mingw, msys ) and in shell prompt gave the below command:
cd C:/pjproject-1.3
./configure
./make dep && make clean && make

To run the pjsua:
cd pjproject-1.3/pjsip-apps/bin
./pjsua-i686-pc-mingw32
and that ran the pjsua_app.

Since I need a script to suit my requirement I went to write my own.

It would be great if you'll help me out.

Thanks!

On Thu, Sep 10, 2009 at 10:55 AM, John Graham
johngavingraham@googlemail.com wrote:

Can you post some more information? A copy & paste of (1) the command
you run that generates the error, (2) the last, say, 50 lines of
output (more if you think it'll help) will help greatly!  Also, what
architecture are you building on? Are you cross-compiling?

John G

On Thu, Sep 10, 2009 at 3:44 PM, Rachel Baskaran
rachelbaskaran@gmail.com wrote:

Hey,

I think this below error is a link error:

Undefined reference to 'pjsua_invite'.

I run pjproject-1.3  with GNU compiler. I checked all the libraries,

but

The way I compile my script: cd C:/pjproject-1.3 make If successful, it places the executable in (pjsip-apps/bin/rach/i686-pc-mingw32) as rach.exe and when I run the exe it registers blah blah... I'm not aware about the command to compile with -Wall and -Werror? How I give the command after cd C:/pjproject-1.3? And if the warning or error still exists how to solve it? Thanks! On Thu, Sep 10, 2009 at 11:31 AM, John Graham < johngavingraham@googlemail.com> wrote: > What's the command-line when you compile? Are you compiling with -Wall > and -Werror? > > Grepping through my include/ and lib/ directories for pjproject-1.3, I > can't find a function in any header file or object in any of the > libraries called pjsua_invite - if you compiled without -Werror, the > compiler probably only spat out a warning of an implicit declaration > and left the error for the linker to find. Try recompiling with > -Werror or just search for warnings to this effect. > > I've not used past versions of this library - could this be a function > you're using from an old API? > > John G > > > On Thu, Sep 10, 2009 at 4:16 PM, Rachel Baskaran > <rachelbaskaran@gmail.com> wrote: > > The script I run:( I highlighted the command where it shows the error ) > > > > #include <pjsua-lib/pjsua.h> > > #include "getopt.h" > > #include <stdlib.h> > > > > > > #define THIS_FILE "rach.c" > > > > #define SIP_DOMAIN "example.com" > > #define SIP_USER "rachel" > > #define SIP_PASSWD "secret" > > > > > > > > > > static pjsip_inv_session *inv_session; > > > > > > /* Notify UI when invite state has changed */ > > > > void pjsua_ui_inv_on_state_changed(pjsip_inv_session *inv, pjsip_event > *e) > > { > > const char *state_names[] = > > { > > "NULL", "CALLING", > > "INCOMING","EARLY","CONNECTING","CONFIRMED","DISCONNECTED","TERMINATED"}; > > > > PJ_UNUSED_ARG(e); > > > > PJ_LOG(3,(THIS_FILE, "Invite session state changed to %s", > > state_names[inv->state])); > > > > if(inv->state == PJSIP_INV_STATE_DISCONNECTED) { > > > > if(inv == inv_session) > > inv_session = NULL; > > } > > else > > { > > inv_session = inv; > > } > > } > > > > > > static void ui_help(void) > > { > > puts(""); > > puts("Console keys:"); > > puts("m Make a call/another call"); > > puts("a Answer incoming call"); > > puts("h Hangup current call"); > > puts("q Quit"); > > puts(""); > > fflush(stdout); > > } > > > > static pj_bool_t input(const char *title,char *buf, pj_size_t len) > > { > > char *p; > > > > printf("%s (empty to cancel):", title); > > fflush(stdout); > > fgets(buf, len, stdin); > > > > /* Remove newlines */ > > for(p=buf; ;++p) > > { > > if(*p =='\r' || *p =='\n') *p='\0'; > > else if(!*p) > > break; > > } > > > > if(!*buf) > > return PJ_FALSE; > > return PJ_TRUE; > > } > > > > > > > > > > static void error_exit(const char *title, pj_status_t status) > > { > > pjsua_perror(THIS_FILE, title, status); > > pjsua_destroy(); > > exit(1); > > } > > > > > > > > > > > > static void ui_console_main(void) > > { > > char buf[128]; > > pjsip_inv_session *inv; > > > > > > //ui_help(); > > > > for(;;) > > { > > > > ui_help(); > > fgets(buf, sizeof(buf), stdin); > > > > switch (buf[0]) { > > > > case 'm': > > if(inv_session != NULL) { > > puts("Can not make call while another one is in progress"); > > fflush(stdout); > > continue; > > } > > > > #if 1 > > > > /* Make call!: */ > > if(!input("Enter URL to call", buf, sizeof(buf))) > > continue; > > > > pjsua_invite(buf, &inv); > > > > #else > > > > pjsua_invite("sip:localhost:5061", &inv); > > > > #endif > > > > break; > > > > > > > > case 'a': > > > > if(inv_session == NULL || inv_session->role != PJSIP_ROLE_UAS || > > inv_session->state >= PJSIP_INV_STATE_CONNECTING) > > { > > puts("No pending incoming call"); > > fflush(stdout); > > continue; > > } > > > > else > > { > > pj_status_t status; > > pjsip_tx_data *tdata; > > > > if(!input("Answer with code (100-699)", buf, sizeof(buf))) > > continue; > > > > > > > > status = pjsip_inv_answer(inv_session, atoi(buf) ,NULL,NULL, &tdata); > > if(status == PJ_SUCCESS) > > status = pjsip_inv_send_msg(inv_session, tdata); > > > > if(status != PJ_SUCCESS) > > error_exit("Unable to create/send response", status); > > } > > > > break; > > > > case 'h': > > > > if(inv_session == NULL) { > > puts("No current call"); > > fflush(stdout); > > continue; > > } > > else > > { > > > > pj_status_t status; > > pjsip_tx_data *tdata; > > > > > > status = pjsip_inv_end_session(inv_session, PJSIP_SC_DECLINE, NULL, > &tdata); > > if(status != PJ_SUCCESS) { > > error_exit("Failed to create end session message", status); > > continue; > > } > > > > status = pjsip_inv_send_msg(inv_session, tdata); > > if(status != PJ_SUCCESS) { > > error_exit("Failed to send end session message", status); > > continue; > > } > > } > > > > break; > > > > case 'q': > > goto on_exit; > > } > > } > > on_exit: > > ; > > > > All I want my script to do is call the specified URL in else part( when > they > > run the script ) or when I press 'm' call the URL I enter. This just the > > part of code. It registers to example.com( since it's test after few > mins it > > says timeout ) > > > > The only line on my shell prompt is: > > output/rach-i686-pc-mingw32/rach.o:rach.c(.text+0x4cf): Undefined > reference > > to 'pjsua_invite'. > > > > All I did when I downloaded the source from pjsip.org, is installed GNU > > compiler( Mingw, msys ) and in shell prompt gave the below command: > > cd C:/pjproject-1.3 > > ./configure > > ./make dep && make clean && make > > > > To run the pjsua: > > cd pjproject-1.3/pjsip-apps/bin > > ./pjsua-i686-pc-mingw32 > > and that ran the pjsua_app. > > > > Since I need a script to suit my requirement I went to write my own. > > > > It would be great if you'll help me out. > > > > Thanks! > > > > > > > > On Thu, Sep 10, 2009 at 10:55 AM, John Graham > > <johngavingraham@googlemail.com> wrote: > >> > >> Can you post some more information? A copy & paste of (1) the command > >> you run that generates the error, (2) the last, say, 50 lines of > >> output (more if you think it'll help) will help greatly! Also, what > >> architecture are you building on? Are you cross-compiling? > >> > >> John G > >> > >> > >> > >> On Thu, Sep 10, 2009 at 3:44 PM, Rachel Baskaran > >> <rachelbaskaran@gmail.com> wrote: > >> > Hey, > >> > > >> > I think this below error is a link error: > >> > > >> > Undefined reference to 'pjsua_invite'. > >> > > >> > I run pjproject-1.3 with GNU compiler. I checked all the libraries, > but > >> > still I get this error. > >> > > >> > How to solve it? > >> > > >> > Any help! > >> > > >> > Thanks! > >> > > >> > _______________________________________________ > >> > Visit our blog: http://blog.pjsip.org > >> > > >> > pjsip mailing list > >> > pjsip@lists.pjsip.org > >> > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > >> > > >> > > >> > >> _______________________________________________ > >> Visit our blog: http://blog.pjsip.org > >> > >> pjsip mailing list > >> pjsip@lists.pjsip.org > >> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > > > > > _______________________________________________ > > Visit our blog: http://blog.pjsip.org > > > > pjsip mailing list > > pjsip@lists.pjsip.org > > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > > > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >
JG
John Graham
Thu, Sep 10, 2009 4:08 PM

Try running:

make CFLAGS='-Wall -Werror'

Remember to resave your source file (or run "touch path/to/file.c" or
whatever) to ensure make thinks it should rebuild it.

But like I said, I can't see pjsua_invite() defined anywhere - where
are you getting that from?

John G

On Thu, Sep 10, 2009 at 4:57 PM, Rachel Baskaran
rachelbaskaran@gmail.com wrote:

The way I compile my script:
cd C:/pjproject-1.3
make

If successful, it places the executable in
(pjsip-apps/bin/rach/i686-pc-mingw32)
as rach.exe and when I run the exe it registers blah blah...

I'm not aware about the command to compile with -Wall and -Werror?

How I give the command after cd C:/pjproject-1.3? And if the warning or
error still exists how to solve it?

Thanks!

Try running: make CFLAGS='-Wall -Werror' Remember to resave your source file (or run "touch path/to/file.c" or whatever) to ensure make thinks it should rebuild it. But like I said, I can't see pjsua_invite() defined anywhere - where are you getting that from? John G On Thu, Sep 10, 2009 at 4:57 PM, Rachel Baskaran <rachelbaskaran@gmail.com> wrote: > The way I compile my script: > cd C:/pjproject-1.3 > make > > > If successful, it places the executable in > (pjsip-apps/bin/rach/i686-pc-mingw32) > as rach.exe and when I run the exe it registers blah blah... > > I'm not aware about the command to compile with -Wall and -Werror? > > How I give the command after cd C:/pjproject-1.3? And if the warning or > error still exists how to solve it? > > Thanks!
RB
Rachel Baskaran
Thu, Sep 10, 2009 4:12 PM

I found it when I goggled. It was script (main.c) written by  2003-2006
Benny Prijono.

Maybe that's why we couldn't find definition, can I replace it with any
other syntax?

I compile as you have told and post it here.

Rachel

On Thu, Sep 10, 2009 at 12:08 PM, John Graham <
johngavingraham@googlemail.com> wrote:

Try running:

make CFLAGS='-Wall -Werror'

Remember to resave your source file (or run "touch path/to/file.c" or
whatever) to ensure make thinks it should rebuild it.

But like I said, I can't see pjsua_invite() defined anywhere - where
are you getting that from?

John G

On Thu, Sep 10, 2009 at 4:57 PM, Rachel Baskaran
rachelbaskaran@gmail.com wrote:

The way I compile my script:
cd C:/pjproject-1.3
make

If successful, it places the executable in
(pjsip-apps/bin/rach/i686-pc-mingw32)
as rach.exe and when I run the exe it registers blah blah...

I'm not aware about the command to compile with -Wall and -Werror?

How I give the command after cd C:/pjproject-1.3? And if the warning or
error still exists how to solve it?

Thanks!

I found it when I goggled. It was script (main.c) written by 2003-2006 Benny Prijono. Maybe that's why we couldn't find definition, can I replace it with any other syntax? I compile as you have told and post it here. Rachel On Thu, Sep 10, 2009 at 12:08 PM, John Graham < johngavingraham@googlemail.com> wrote: > Try running: > > make CFLAGS='-Wall -Werror' > > Remember to resave your source file (or run "touch path/to/file.c" or > whatever) to ensure make thinks it should rebuild it. > > But like I said, I can't see pjsua_invite() defined anywhere - where > are you getting that from? > > John G > > > > On Thu, Sep 10, 2009 at 4:57 PM, Rachel Baskaran > <rachelbaskaran@gmail.com> wrote: > > The way I compile my script: > > cd C:/pjproject-1.3 > > make > > > > > > If successful, it places the executable in > > (pjsip-apps/bin/rach/i686-pc-mingw32) > > as rach.exe and when I run the exe it registers blah blah... > > > > I'm not aware about the command to compile with -Wall and -Werror? > > > > How I give the command after cd C:/pjproject-1.3? And if the warning or > > error still exists how to solve it? > > > > Thanks! > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >
RB
Rachel Baskaran
Thu, Sep 10, 2009 4:34 PM

Alright this time my error:
cd C:/pjproject-1.3
make CFLAGS='-Wall -Werror'

../src/rach/rach.c:In function 'ui_console_main'
../src/rach/rach.c:117:warning :implicit declaration of function
'pjsua_invite'

Is there any way to just change the call part to work in the script I
attached, coz I have to make this working.

Rachel

On Thu, Sep 10, 2009 at 12:12 PM, Rachel Baskaran
rachelbaskaran@gmail.comwrote:

I found it when I goggled. It was script (main.c) written by  2003-2006
Benny Prijono.

Maybe that's why we couldn't find definition, can I replace it with any
other syntax?

I compile as you have told and post it here.

Rachel

On Thu, Sep 10, 2009 at 12:08 PM, John Graham <
johngavingraham@googlemail.com> wrote:

Try running:

make CFLAGS='-Wall -Werror'

Remember to resave your source file (or run "touch path/to/file.c" or
whatever) to ensure make thinks it should rebuild it.

But like I said, I can't see pjsua_invite() defined anywhere - where
are you getting that from?

John G

On Thu, Sep 10, 2009 at 4:57 PM, Rachel Baskaran
rachelbaskaran@gmail.com wrote:

The way I compile my script:
cd C:/pjproject-1.3
make

If successful, it places the executable in
(pjsip-apps/bin/rach/i686-pc-mingw32)
as rach.exe and when I run the exe it registers blah blah...

I'm not aware about the command to compile with -Wall and -Werror?

How I give the command after cd C:/pjproject-1.3? And if the warning or
error still exists how to solve it?

Thanks!

Alright this time my error: cd C:/pjproject-1.3 make CFLAGS='-Wall -Werror' ../src/rach/rach.c:In function 'ui_console_main' ../src/rach/rach.c:117:warning :implicit declaration of function 'pjsua_invite' Is there any way to just change the call part to work in the script I attached, coz I have to make this working. Rachel On Thu, Sep 10, 2009 at 12:12 PM, Rachel Baskaran <rachelbaskaran@gmail.com>wrote: > I found it when I goggled. It was script (main.c) written by 2003-2006 > Benny Prijono. > > Maybe that's why we couldn't find definition, can I replace it with any > other syntax? > > I compile as you have told and post it here. > > Rachel > > On Thu, Sep 10, 2009 at 12:08 PM, John Graham < > johngavingraham@googlemail.com> wrote: > >> Try running: >> >> make CFLAGS='-Wall -Werror' >> >> Remember to resave your source file (or run "touch path/to/file.c" or >> whatever) to ensure make thinks it should rebuild it. >> >> But like I said, I can't see pjsua_invite() defined anywhere - where >> are you getting that from? >> >> John G >> >> >> >> On Thu, Sep 10, 2009 at 4:57 PM, Rachel Baskaran >> <rachelbaskaran@gmail.com> wrote: >> > The way I compile my script: >> > cd C:/pjproject-1.3 >> > make >> > >> > >> > If successful, it places the executable in >> > (pjsip-apps/bin/rach/i686-pc-mingw32) >> > as rach.exe and when I run the exe it registers blah blah... >> > >> > I'm not aware about the command to compile with -Wall and -Werror? >> > >> > How I give the command after cd C:/pjproject-1.3? And if the warning or >> > error still exists how to solve it? >> > >> > Thanks! >> >> _______________________________________________ >> Visit our blog: http://blog.pjsip.org >> >> pjsip mailing list >> pjsip@lists.pjsip.org >> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >> > >
JG
John Graham
Thu, Sep 10, 2009 5:21 PM

You could copy the current code that function called (one version
(don't know if it's the latest) is in
http://svn.pjsip.org/repos/pjproject/tags/0.5.0-before-conf/pjsip/src/pjsua/pjsua_inv.c)
or search through the library to find a suitable function/set of
functions.

John G

On Thu, Sep 10, 2009 at 5:34 PM, Rachel Baskaran
rachelbaskaran@gmail.com wrote:

Alright this time my error:
cd C:/pjproject-1.3
make CFLAGS='-Wall -Werror'

../src/rach/rach.c:In function 'ui_console_main'
../src/rach/rach.c:117:warning :implicit declaration of function
'pjsua_invite'

Is there any way to just change the call part to work in the script I
attached, coz I have to make this working.

Rachel

You could copy the current code that function called (one version (don't know if it's the latest) is in http://svn.pjsip.org/repos/pjproject/tags/0.5.0-before-conf/pjsip/src/pjsua/pjsua_inv.c) or search through the library to find a suitable function/set of functions. John G On Thu, Sep 10, 2009 at 5:34 PM, Rachel Baskaran <rachelbaskaran@gmail.com> wrote: > Alright this time my error: > cd C:/pjproject-1.3 > make CFLAGS='-Wall -Werror' > > > ../src/rach/rach.c:In function 'ui_console_main' > ../src/rach/rach.c:117:warning :implicit declaration of function > 'pjsua_invite' > > Is there any way to just change the call part to work in the script I > attached, coz I have to make this working. > > Rachel
RB
Rachel Baskaran
Thu, Sep 10, 2009 5:53 PM

Oh now It gives me this error:
make[2]: Entering dir '/c/pjproject-1.3/pjsip-apps/build'
make[2]:'../bin/pjsua-i686-pc-mingw32' is up to date
make[2]: leaving
make -f Samples.mak
make[2]: Entering dir '/c/pjproject-1.3/pjsip-apps/build'
make[2]: Nothing to be done for 'all'
make[2]: Leaving dir '/c/pjproject-1.3/pjsip-apps/build'

I have my folder rach in pjsip-apps/src/rach.
Samples.mak(pjsip-apps/build)

include ../../build/common.mak
###############################################################################

Gather all flags.

export _CFLAGS    := $(PJ_CFLAGS) $(CFLAGS)
export _CXXFLAGS:= $(PJ_CXXFLAGS)
export _LDFLAGS := $(PJ_LDFLAGS) $(PJ_LDLIBS) $(LDFLAGS)

SRCDIR := ../src/rach
OBJDIR := ./output/rach-$(TARGET_NAME)
BINDIR := ../bin/rach/$(TARGET_NAME)

rach := simple_pjsua
rach
EXES := $(foreach file, $(rach), $(BINDIR)/$(file)$(HOST_EXE))

Previously it was working but now it doesn't . what am I missing?

I'll check out the code.

Rachel

On Thu, Sep 10, 2009 at 1:21 PM, John Graham <johngavingraham@googlemail.com

wrote:

You could copy the current code that function called (one version
(don't know if it's the latest) is in

http://svn.pjsip.org/repos/pjproject/tags/0.5.0-before-conf/pjsip/src/pjsua/pjsua_inv.c
)
or search through the library to find a suitable function/set of
functions.

John G

On Thu, Sep 10, 2009 at 5:34 PM, Rachel Baskaran
rachelbaskaran@gmail.com wrote:

Alright this time my error:
cd C:/pjproject-1.3
make CFLAGS='-Wall -Werror'

../src/rach/rach.c:In function 'ui_console_main'
../src/rach/rach.c:117:warning :implicit declaration of function
'pjsua_invite'

Is there any way to just change the call part to work in the script I
attached, coz I have to make this working.

Rachel

Oh now It gives me this error: make[2]: Entering dir '/c/pjproject-1.3/pjsip-apps/build' make[2]:'../bin/pjsua-i686-pc-mingw32' is up to date make[2]: leaving make -f Samples.mak make[2]: Entering dir '/c/pjproject-1.3/pjsip-apps/build' make[2]: Nothing to be done for 'all' make[2]: Leaving dir '/c/pjproject-1.3/pjsip-apps/build' I have my folder rach in pjsip-apps/src/rach. Samples.mak(pjsip-apps/build) include ../../build/common.mak ############################################################################### # Gather all flags. # export _CFLAGS := $(PJ_CFLAGS) $(CFLAGS) export _CXXFLAGS:= $(PJ_CXXFLAGS) export _LDFLAGS := $(PJ_LDFLAGS) $(PJ_LDLIBS) $(LDFLAGS) SRCDIR := ../src/rach OBJDIR := ./output/rach-$(TARGET_NAME) BINDIR := ../bin/rach/$(TARGET_NAME) rach := simple_pjsua \ rach \ EXES := $(foreach file, $(rach), $(BINDIR)/$(file)$(HOST_EXE)) Previously it was working but now it doesn't . what am I missing? I'll check out the code. Rachel On Thu, Sep 10, 2009 at 1:21 PM, John Graham <johngavingraham@googlemail.com > wrote: > You could copy the current code that function called (one version > (don't know if it's the latest) is in > > http://svn.pjsip.org/repos/pjproject/tags/0.5.0-before-conf/pjsip/src/pjsua/pjsua_inv.c > ) > or search through the library to find a suitable function/set of > functions. > > John G > > > > On Thu, Sep 10, 2009 at 5:34 PM, Rachel Baskaran > <rachelbaskaran@gmail.com> wrote: > > Alright this time my error: > > cd C:/pjproject-1.3 > > make CFLAGS='-Wall -Werror' > > > > > > ../src/rach/rach.c:In function 'ui_console_main' > > ../src/rach/rach.c:117:warning :implicit declaration of function > > 'pjsua_invite' > > > > Is there any way to just change the call part to work in the script I > > attached, coz I have to make this working. > > > > Rachel > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >