Undefined reference problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  Hello,

I have build the pjproject1.8, using MSYS and MingW.
Now I am using Qt Creator 2.x / Qt 4.7 to make use of PJSIP.

I am running this on Windows right now, but I get the same result when 
running on Ubuntu (where I build using g++ and the instructions from the 
PJSIP website).

I did include the paths to includes and included the libs.

To test, I am only using a simple console, that includes pjsua.h, from 
the example and I call pjsua_create. However, I get undefined reference 
warnings, but I can't seem to figure out, which lib I am not including, 
since I think I got them all in the list.

It is a whole list of 'em, here a the top few:

Warning: .drectve `-aligncomm:_pjsua_var,5' unrecognized

d:/PJSIP/pjsip/lib/libpjsua-i686-pc-mingw32.a(pjsua_core.o):pjsua_core.c:(.text+0x80): 
undefined reference to `pj_sockaddr_get_addr'

d:/PJSIP/pjsip/lib/libpjsua-i686-pc-mingw32.a(pjsua_core.o):pjsua_core.c:(.text+0x9f): 
undefined reference to `pj_inet_ntop'

d:/PJSIP/pjsip/lib/libpjsua-i686-pc-mingw32.a(pjsua_core.o):pjsua_core.c:(.text+0x116): 
undefined reference to `pj_mutex_lock'

d:/PJSIP/pjsip/lib/libpjsua-i686-pc-mingw32.a(pjsua_core.o):pjsua_core.c:(.text+0x11e): 
undefined reference to `pj_list_erase'

d:/PJSIP/pjsip/lib/libpjsua-i686-pc-mingw32.a(pjsua_core.o):pjsua_core.c:(.text+0x12b): 
undefined reference to `pj_mutex_unlock'

d:/PJSIP/pjsip/lib/libpjsua-i686-pc-mingw32.a(pjsua_core.o):pjsua_core.c:(.text+0x13d): 
undefined reference to `pj_pool_release'

d:/PJSIP/pjsip/lib/libpjsua-i686-pc-mingw32.a(pjsua_core.o):pjsua_core.c:(.text+0x177): 
undefined reference to `pj_mutex_lock'

d:/PJSIP/pjsip/lib/libpjsua-i686-pc-mingw32.a(pjsua_core.o):pjsua_core.c:(.text+0x193): 
undefined reference to `pj_mutex_unlock'

d:/PJSIP/pjsip/lib/libpjsua-i686-pc-mingw32.a(pjsua_core.o):pjsua_core.c:(.text+0x1b9): 
undefined reference to `pj_log_get_level'

d:/PJSIP/pjsip/lib/libpjsua-i686-pc-mingw32.a(pjsua_core.o):pjsua_core.c:(.text+0x1d5): 
undefined reference to `pjsip_tx_data_get_info'

d:/PJSIP/pjsip/lib/libpjsua-i686-pc-mingw32.a(pjsua_core.o):pjsua_core.c:(.text+0x219): 
undefined reference to `pj_log_4'

d:/PJSIP/pjsip/lib/libpjsua-i686-pc-mingw32.a(pjsua_core.o):pjsua_core.c:(.text+0x235): 
undefined reference to `pj_log_get_level'

d:/PJSIP/pjsip/lib/libpjsua-i686-pc-mingw32.a(pjsua_core.o):pjsua_core.c:(.text+0x257): 
undefined reference to `pjsip_rx_data_get_info'

d:/PJSIP/pjsip/lib/libpjsua-i686-pc-mingw32.a(pjsua_core.o):pjsua_core.c:(.text+0x296): 
undefined reference to `pj_log_4'

d:/PJSIP/pjsip/lib/libpjsua-i686-pc-mingw32.a(pjsua_core.o):pjsua_core.c:(.text+0x2d1): 
undefined reference to `pj_file_write'

d:/PJSIP/pjsip/lib/libpjsua-i686-pc-mingw32.a(pjsua_core.o):pjsua_core.c:(.text+0x308): 
undefined reference to `pj_log_write'

d:/PJSIP/pjsip/lib/libpjsua-i686-pc-mingw32.a(pjsua_core.o):pjsua_core.c:(.text+0x334): 
undefined reference to `pj_strerror'



Code looks like this:

#include <QtCore/QCoreApplication>

#include  <pjsua-lib/pjsua.h>

int  main(int  argc,  char  *argv[])

{

     //QCoreApplication  a(argc,  argv);

     //return  a.exec();

     pjsua_acc_id  acc_id;

     pj_status_t  status;

     /*  Create  pjsua  first!  */

     status  =  pjsua_create();

}



Project file looks like this:

#-------------------------------------------------

#

# Project created by QtCreator 2010-10-11T11:04:49

#

#-------------------------------------------------

QT        += core

QT        -= gui

TARGET  = PJCONSOLE

CONFIG    += console

CONFIG    -= app_bundle

DEFINES  -= UNICODE

TEMPLATE  = app

INCLUDEPATH  += "d:/PJSIP/pjlib/include" \

                 "d:/PJSIP/pjlib-util/include" \

                 "d:/PJSIP/pjnath/include" \

                 "d:/PJSIP/pjmedia/include" \

                 "d:/PJSIP/pjsip/include"

LIBS  += "d:/PJSIP/pjlib/lib/libpj-i686-pc-mingw32.a"

LIBS  += "d:/PJSIP/pjlib-util/lib/libpjlib-util-i686-pc-mingw32.a"

LIBS  += "d:/PJSIP/pjnath/lib/libpjnath-i686-pc-mingw32.a"

LIBS  += "d:/PJSIP/pjmedia/lib/libpjmedia-audiodev-i686-pc-mingw32.a"

LIBS  += "d:/PJSIP/pjmedia/lib/libpjmedia-codec-i686-pc-mingw32.a"

LIBS  += "d:/PJSIP/pjmedia/lib/libpjmedia-i686-pc-mingw32.a"

LIBS  += "d:/PJSIP/pjmedia/lib/libpjsdp-i686-pc-mingw32.a"

LIBS  += "d:/PJSIP/pjsip/lib/libpjsip-i686-pc-mingw32.a"

LIBS  += "d:/PJSIP/pjsip/lib/libpjsip-simple-i686-pc-mingw32.a"

LIBS  += "d:/PJSIP/pjsip/lib/libpjsip-ua-i686-pc-mingw32.a"

LIBS  += "d:/PJSIP/pjsip/lib/libpjsua-i686-pc-mingw32.a"

SOURCES  += main.cpp


What am I doing wrong??
Thanks in advance,

Stefan Hobbel
stefanhobbel at abstraxxion.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20101011/342c925d/attachment-0001.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux