[pjsip] Makefile for pjsua !

Daniel Mikusa dan at mikusa.com
Fri Apr 4 11:49:33 EDT 2008


Looks like you might be missing the libraries under the 'sipua' rule.

try changing


sipua: pjsua_app.o main.o
   $(CC) -o $@ $^ $(LDFLAGS)

to

sipua: pjsua_app.o main.o
   $(CC) -o $@ $^ $(LDFLAGS) $(LDLIBS)


Dan


Damien Herraud wrote:
> Hi benny,
>
> I modified the rules in the submitted Makefile by these ones :
>
> # If your application is in a file named myapp.cpp or myapp.c
> # this is the line you will need to build the binary.
> all: sipua
>
> sipua: pjsua_app.o main.o
>    $(CC) -o $@ $^ $(LDFLAGS)
>
> pjsua_app.o: pjsua_app.c
>    $(CC) -o $@ -c $< $(CPPFLAGS) $(LDFLAGS) $(LDLIBS)
>
> main.o: main.c
>    $(CC) -o $@ -c $< $(CPPFLAGS) $(LDFLAGS) $(LDLIBS)
>
> clean:
>    rm -f *.o sipua
>
> What I get when trying to compile is :
>
> pjsua_app.c:(.text+0x6c23): undefined reference to 
> `pjsua_call_xfer_replaces'
> pjsua_app.c:(.text+0x6c8e): undefined reference to `pj_str'
> pjsua_app.c:(.text+0x6cb9): undefined reference to 
> `pjsip_generic_string_hdr_init2'
> pjsua_app.c:(.text+0x6ccb): undefined reference to `pj_list_insert_before'
> pjsua_app.o: In function `app_main':
> pjsua_app.c:(.text+0x6ce8): undefined reference to `pjsua_start'
> pjsua_app.o: In function `on_typing':
> pjsua_app.c:(.text+0x14d): undefined reference to `pj_log_3'
> collect2: ld returned 1 exit status
> make: *** [sipua] Error 1
>
> And many more undefined references !
> Again, I apologize for my poor knowledges in Makefiles !
>
>
> Cheers,
>
> Damien
>
>
>
>
>
>
> -- 
> This message has been scanned for viruses and
> dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is
> believed to be clean.
> ------------------------------------------------------------------------
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>   




More information about the pjsip mailing list