LInk errors while building with pjsip libraries

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

 



Hi,

I have downloaded and installed PJSIP as per the instructions provided in 
http://trac.pjsip.org/repos/wiki/Getting-Started

I have successfully run configure, make dep, make all and make install on Fedora 12.

I can see the archives built for each of pjlib, pjsip, pjmedia, pjnath and pjlib-util under the respective lib directories. I have linked to these in my makefile rule for building my client application coded using pjsua libraries.

However, I get a  bunch of link errors for pjsua routines in my code.

See the output below (only part of the output has been reproduced).
gcc -I. -I/usr/src/pjproject-1.6/pjlib/include  -I/usr/src/pjproject-1.6/pjlib-util/include  -I/usr/src/pjproject-1.6/pjmedia/include  -I/usr/src/pjproject-1.6/pjnath/include  -I/usr/src/pjproject-1.6/pjsip/include   -L/usr/src/pjproject-1.6/pjlib/lib  -L/usr/src/pjproject-1.6/pjlib-util/lib  -L/usr/src/pjproject-1.6/pjmedia/lib  -L/usr/src/pjproject-1.6/pjnath/lib  -L/usr/src/pjproject-1.6/pjsip/lib  -c sipClient.c 
gcc -I. -I/usr/src/pjproject-1.6/pjlib/include  -I/usr/src/pjproject-1.6/pjlib-util/include  -I/usr/src/pjproject-1.6/pjmedia/include  -I/usr/src/pjproject-1.6/pjnath/include  -I/usr/src/pjproject-1.6/pjsip/include   -L/usr/src/pjproject-1.6/pjlib/lib  -L/usr/src/pjproject-1.6/pjlib-util/lib  -L/usr/src/pjproject-1.6/pjmedia/lib  -L/usr/src/pjproject-1.6/pjnath/lib  -L/usr/src/pjproject-1.6/pjsip/lib  -o sipClient sipClient.o -lpj-i686-pc-linux-gnu -lpjlib-util-i686-pc-linux-gnu -lpjmedia-audiodev-i686-pc-linux-gnu -lpjmedia-codec-i686-pc-linux-gnu  -lpjmedia-i686-pc-linux-gnu -lpjsdp-i686-pc-linux-gnu -lpjnath-i686-pc-linux-gnu -lpjsip-i686-pc-linux-gnu  -lpjsip-simple-i686-pc-linux-gnu -lpjsip-ua-i686-pc-linux-gnu -lpjsua-i686-pc-linux-gnu -lpthread
sipClient.o: In function `makeUdpTransportObj':
sipClient.c:(.text+0x359): undefined reference to `pjsua_create_transport'
/usr/src/pjproject-1.6/pjsip/lib/libpjsua-i686-pc-linux-gnu.a(pjsua_acc.o): In function `pjsua_enum_accs':
pjsua_acc.c:(.text+0x159): undefined reference to `pj_mutex_lock'
pjsua_acc.c:(.text+0x18f): undefined reference to `pj_mutex_unlock'
/usr/src/pjproject-1.6/pjsip/lib/libpjsua-i686-pc-linux-gnu.a(pjsua_acc.o): In function `pjsua_acc_set_user_data':
pjsua_acc.c:(.text+0x299): undefined reference to `pj_mutex_lock'
pjsua_acc.c:(.text+0x2af): undefined reference to `pj_mutex_unlock'
/usr/src/pjproject-1.6/pjsip/lib/libpjsua-i686-pc-linux-gnu.a(pjsua_acc.o): In function `schedule_reregistration':
pjsua_acc.c:(.text+0x380): undefined reference to `pj_log_get_level'
pjsua_acc.c:(.text+0x3aa): undefined reference to `pj_log_3'
/usr/src/pjproject-1.6/pjsip/lib/libpjsua-i686-pc-linux-gnu.a(pjsua_acc.o): In function `pjsua_acc_on_tp_state_changed':
pjsua_acc.c:(.text+0x459): undefined reference to `pjsip_transport_shutdown'
pjsua_acc.c:(.text+0x466): undefined reference to `pj_mutex_lock'
/usr/src/pjproject-1.6/pjsip/lib/libpjsua-i686-pc-linux-gnu.a(pjsua_acc.o): In function `pjsua_acc_create_request':
pjsua_acc.c:(.text+0x55e): undefined reference to `pjsip_endpt_create_request'
pjsua_acc.c:(.text+0x596): undefined reference to `pjsip_hdr_clone'
pjsua_acc.c:(.text+0x5ae): undefined reference to `pj_list_insert_before'
pjsua_acc.c:(.text+0x5ef): undefined reference to `pjsip_tx_data_set_transport'
/usr/src/pjproject-1.6/pjsip/lib/libpjsua-i686-pc-linux-gnu.a(pjsua_acc.o): In function `is_private_ip':
pjsua_acc.c:(.text+0x6ca): undefined reference to `pj_strncmp'
/usr/src/pjproject-1.6/pjsip/lib/libpjsua-i686-pc-linux-gnu.a(pjsua_acc.o): In function `update_keep_alive':
pjsua_acc.c:(.text+0x75e): undefined reference to `pjsip_endpt_cancel_timer'
pjsua_acc.c:(.text+0x776): undefined reference to `pjsip_transport_dec_ref'
pjsua_acc.c:(.text+0x79a): undefined reference to `pjsip_transport_add_ref'
pjsua_acc.c:(.text+0x80c): undefined reference to `pjsip_endpt_schedule_timer'
pjsua_acc.c:(.text+0x821): undefined reference to `pj_log_get_level'
pjsua_acc.c:(.text+0x868): undefined reference to `pj_log_4'
pjsua_acc.c:(.text+0x88c): undefined reference to `pjsip_transport_dec_ref'
/usr/src/pjproject-1.6/pjsip/lib/libpjsua-i686-pc-linux-gnu.a(pjsua_acc.o): In function `pjsua_acc_set_online_status2':
pjsua_acc.c:(.text+0x939): undefined reference to `pj_mutex_lock'
pjsua_acc.c:(.text+0x961): undefined reference to `pjrpid_element_dup'
pjsua_acc.c:(.text+0x961): undefined reference to `pjrpid_element_dup'
pjsua_acc.c:(.text+0x96e): undefined reference to `pj_mutex_unlock'
/usr/src/pjproject-1.6/pjsip/lib/libpjsua-i686-pc-linux-gnu.a(pjsua_acc.o): In function `pjsua_acc_config_dup':
pjsua_acc.c:(.text+0x9ca): undefined reference to `pj_strdup_with_null'
pjsua_acc.c:(.text+0x9e6): undefined reference to `pj_strdup_with_null'
pjsua_acc.c:(.text+0xa02): undefined reference to `pj_strdup_with_null'
pjsua_acc.c:(.text+0xa1e): undefined reference to `pj_strdup_with_null'
pjsua_acc.c:(.text+0xa5c): undefined reference to `pj_strdup_with_null'
pjsua_acc.c:(.text+0xab7): undefined reference to `pjsip_cred_info_dup'
/usr/src/pjproject-1.6/pjsip/lib/libpjsua-i686-pc-linux-gnu.a(pjsua_acc.o): In function `calc_proxy_crc':
pjsua_acc.c:(.text+0xb15): undefined reference to `pj_crc32_init'
pjsua_acc.c:(.text+0xb3e): undefined reference to `pj_crc32_update'
pjsua_acc.c:(.text+0xb4b): undefined reference to `pj_crc32_final'
/usr/src/pjproject-1.6/pjsip/lib/libpjsua-i686-pc-linux-gnu.a(pjsua_acc.o): In function `keep_alive_timer_cb':
pjsua_acc.c:(.text+0xb78): undefined reference to `pj_mutex_lock'
pjsua_acc.c:(.text+0xba3): undefined reference to `pj_log_get_level'
pjsua_acc.c:(.text+0xbd4): undefined reference to `pjsip_endpt_get_tpmgr'
pjsua_acc.c:(.text+0xc1c): undefined reference to `pjsip_tpmgr_send_raw'
pjsua_acc.c:(.text+0xc4f): undefined reference to `pjsip_endpt_schedule_timer'
pjsua_acc.c:(.text+0xc67): undefined reference to `pj_mutex_unlock'
pjsua_acc.c:(.text+0xcd3): undefined reference to `pj_sockaddr_print'
pjsua_acc.c:(.text+0xcff): undefined reference to `pj_log_5'
/usr/src/pjproject-1.6/pjsip/lib/libpjsua-i686-pc-linux-gnu.a(pjsua_acc.o): In function `update_service_route':
pjsua_acc.c:(.text+0xd51): undefined reference to `pjsip_msg_find_hdr_by_name'
pjsua_acc.c:(.text+0xd93): undefined reference to `pjsip_parse_hdr'
pjsua_acc.c:(.text+0xdd6): undefined reference to `pj_strnicmp2'
pjsua_acc.c:(.text+0xe46): undefined reference to `pj_strnicmp2'
pjsua_acc.c:(.text+0xe4f): undefined reference to `pj_log_get_level'
pjsua_acc.c:(.text+0xe78): undefined reference to `pj_log_1'
pjsua_acc.c:(.text+0xe92): undefined reference to `pj_log_get_level'
pjsua_acc.c:(.text+0xeaa): undefined reference to `pj_log_1'
pjsua_acc.c:(.text+0xec2): undefined reference to `pj_list_size'
pjsua_acc.c:(.text+0xef1): undefined reference to `pj_list_erase'
pjsua_acc.c:(.text+0xf0e): undefined reference to `pjsip_route_hdr_create'
pjsua_acc.c:(.text+0xf37): undefined reference to `pj_list_insert_before'
pjsua_acc.c:(.text+0xf44): undefined reference to `pj_log_get_level'
pjsua_acc.c:(.text+0xf72): undefined reference to `pj_log_4'
pjsua_acc.c:(.text+0xf7c): undefined reference to `pj_log_get_level'
pjsua_acc.c:(.text+0xf98): undefined reference to `pj_log_1'
/usr/src/pjproject-1.6/pjsip/lib/libpjsua-i686-pc-linux-gnu.a(pjsua_acc.o): In function `pjsua_acc_find_for_outgoing':

pjsua_acc.c:(.text+0xfc2): undefined reference to `pj_mutex_lock'
pjsua_acc.c:(.text+0xffa): undefined reference to `pj_strdup_with_null'
pjsua_acc.c:(.text+0x101b): undefined reference to `pjsip_parse_uri'
pjsua_acc.c:(.text+0x1040): undefined reference to `pj_strnicmp2'
pjsua_acc.c:(.text+0x1067): undefined reference to `pj_strnicmp2'
pjsua_acc.c:(.text+0x10a7): undefined reference to `pj_pool_release'
pjsua_acc.c:(.text+0x10b4): undefined reference to `pj_mutex_unlock'
pjsua_acc.c:(.text+0x1106): undefined reference to `pj_stricmp'
pjsua_acc.c:(.text+0x1161): undefined reference to `pj_stricmp'
pjsua_acc.c:(.text+0x1170): undefined reference to `pj_pool_release'
pjsua_acc.c:(.text+0x117d): undefined reference to `pj_mutex_unlock'
pjsua_acc.c:(.text+0x1197): undefined reference to `pj_pool_release'
pjsua_acc.c:(.text+0x11a4): undefined reference to `pj_mutex_unlock'
/usr/src/pjproject-1.6/pjsip/lib/libpjsua-i686-pc-linux-gnu.a(pjsua_acc.o): In function `pjsua_acc_get_info':
pjsua_acc.c:(.text+0x126c): undefined reference to `pj_mutex_lock'
pjsua_acc.c:(.text+0x1286): undefined reference to `pj_mutex_unlock'
pjsua_acc.c:(.text+0x134c): undefined reference to `pjsip_get_status_text'
pjsua_acc.c:(.text+0x1374): undefined reference to `pjsip_regc_get_info'
pjsua_acc.c:(.text+0x1387): undefined reference to `pj_mutex_unlock'
pjsua_acc.c:(.text+0x13ac): undefined reference to `pj_str'
pjsua_acc.c:(.text+0x13e4): undefined reference to `pj_str'
pjsua_acc.c:(.text+0x1428): undefined reference to `pj_strerror'
/usr/src/pjproject-1.6/pjsip/lib/libpjsua-i686-pc-linux-gnu.a(pjsua_acc.o): In function `pjsua_acc_enum_info':
pjsua_acc.c:(.text+0x14f6): undefined reference to `pj_mutex_lock'
pjsua_acc.c:(.text+0x1528): undefined reference to `pj_mutex_unlock'
/usr/src/pjproject-1.6/pjsip/lib/libpjsua-i686-pc-linux-gnu.a(pjsua_acc.o): In function `pjsua_acc_create_uac_contact':
pjsua_acc.c:(.text+0x15f0): undefined reference to `pj_strnicmp2'
pjsua_acc.c:(.text+0x1645): undefined reference to `pjsip_transport_get_flag_from_type'
pjsua_acc.c:(.text+0x1664): undefined reference to `pjsip_endpt_get_tpmgr'
pjsua_acc.c:(.text+0x168c): undefined reference to `pjsip_tpmgr_find_local_addr'
pjsua_acc.c:(.text+0x16d5): undefined reference to `pjsip_transport_get_type_name'
pjsua_acc.c:(.text+0x1766): undefined reference to `pj_pool_alloc'
pjsua_acc.c:(.text+0x184a): undefined reference to `pj_strdup_with_null'
pjsua_acc.c:(.text+0x186b): undefined reference to `pjsip_parse_uri'
pjsua_acc.c:(.text+0x1895): undefined reference to `pj_strnicmp2'
pjsua_acc.c:(.text+0x18bf): undefined reference to `pj_strnicmp2'
pjsua_acc.c:(.text+0x18e7): undefined reference to `pjsip_transport_get_type_from_name'
/usr/src/pjproject-1.6/pjsip/lib/libpjsua-i686-pc-linux-gnu.a(pjsua_acc.o): In function `pjsua_acc_set_registration':
pjsua_acc.c:(.text+0x1997): undefined reference to `pj_mutex_lock'
pjsua_acc.c:(.text+0x1a00): undefined reference to `pjsip_regc_unregister'
pjsua_acc.c:(.text+0x1a32): undefined reference to `pj_mutex_unlock'
pjsua_acc.c:(.text+0x1a69): undefined reference to `pjsip_regc_register'
pjsua_acc.c:(.text+0x1a95): undefined reference to `pjsip_regc_send'
pjsua_acc.c:(.text+0x1ab5): undefined reference to `pjsip_regc_get_info'
pjsua_acc.c:(.text+0x1ac3): undefined reference to `pj_log_get_level'
pjsua_acc.c:(.text+0x1af3): undefined reference to `pj_log_3'
pjsua_acc.c:(.text+0x1afd): undefined reference to `pj_log_get_level'
pjsua_acc.c:(.text+0x1b22): undefined reference to `pj_log_3'
pjsua_acc.c:(.text+0x1b63): undefined reference to `pjsip_regc_destroy'
pjsua_acc.c:(.text+0x1ba6): undefined reference to `pjsip_regc_create'
pjsua_acc.c:(.text+0x1c5d): undefined reference to `pj_strdup_with_null'
pjsua_acc.c:(.text+0x1ca8): undefined reference to `pjsip_regc_init'
pjsua_acc.c:(.text+0x1cf7): undefined reference to `pjsip_regc_set_transport'
pjsua_acc.c:(.text+0x1d26): undefined reference to `pjsip_regc_set_prefs'
pjsua_acc.c:(.text+0x1d49): undefined reference to `pjsip_regc_set_route_set'
pjsua_acc.c:(.text+0x1d67): undefined reference to `pj_pool_release'
pjsua_acc.c:(.text+0x1df9): undefined reference to `pj_log_get_level'
pjsua_acc.c:(.text+0x1e16): undefined reference to `pj_log_3'
pjsua_acc.c:(.text+0x1e47): undefined reference to `pjsip_regc_destroy'
pjsua_acc.c:(.text+0x1e52): undefined reference to `pj_pool_release'
pjsua_acc.c:(.text+0x1e93): undefined reference to `pjsip_regc_destroy'
pjsua_acc.c:(.text+0x1e9e): undefined reference to `pj_pool_release'
pjsua_acc.c:(.text+0x1edf): undefined reference to `pjsip_regc_set_credentials'
pjsua_acc.c:(.text+0x1f21): undefined reference to `pjsip_generic_string_hdr_create'
pjsua_acc.c:(.text+0x1f2d): undefined reference to `pj_list_insert_before'
pjsua_acc.c:(.text+0x1f45): undefined reference to `pjsip_regc_add_headers'
/usr/src/pjproject-1.6/pjsip/lib/libpjsua-i686-pc-linux-gnu.a(pjsua_acc.o): In function `auto_rereg_timer_cb':
pjsua_acc.c:(.text+0x1f69): undefined reference to `pj_mutex_lock'
/usr/src/pjproject-1.6/pjsip/lib/libpjsua-i686-pc-linux-gnu.a(pjsua_acc.o): In function `regc_cb':
pjsua_acc.c:(.text+0x2029): undefined reference to `pj_mutex_lock'
pjsua_acc.c:(.text+0x210c): undefined reference to `pjsip_parse_hdr'
pjsua_acc.c:(.text+0x213b): undefined reference to `PJ_AF_UNSPEC'
pjsua_acc.c:(.text+0x2162): undefined reference to `pj_sockaddr_parse'
pjsua_acc.c:(.text+0x2194): undefined reference to `pj_str'
pjsua_acc.c:(.text+0x21d5): undefined reference to `pj_sockaddr_cmp'
pjsua_acc.c:(.text+0x21e2): undefined reference to `pj_log_get_level'
pjsua_acc.c:(.text+0x2213): undefined reference to `pjsip_regc_destroy'
pjsua_acc.c:(.text+0x226a): undefined reference to `pj_pool_alloc'
pjsua_acc.c:(.text+0x2368): undefined reference to `pj_strdup2_with_null'
pjsua_acc.c:(.text+0x2389): undefined reference to `pj_strdup_with_null'
........
Please let me know what is wrong. The following is my makefile:
# This is the makefile for sipClient
  
# path for base directory
BASEDIR = /usr/src/pjproject-1.6 
  
# paths for PJSUA include directories
PJSUALIBINCDIR = $(strip $(BASEDIR))/pjlib/include 
PJSUALIBUTILINCDIR = $(strip $(BASEDIR))/pjlib-util/include 
PJSUAMEDIAINCDIR = $(strip $(BASEDIR))/pjmedia/include 
PJSUANATINCDIR = $(strip $(BASEDIR))/pjnath/include 
PJSUASIPINCDIR = $(strip $(BASEDIR))/pjsip/include 
PJSUAALLINCDIR = $(strip $(SIPDIR))/pjsua-lib 
 
# paths for PJSUA library directories
PJSUALIBLIBDIR = $(strip $(BASEDIR))/pjlib/lib
PJSUALIBUTILLIBDIR = $(strip $(BASEDIR))/pjlib-util/lib
PJSUAMEDIALIBDIR = $(strip $(BASEDIR))/pjmedia/lib
PJSUANATLIBDIR = $(strip $(BASEDIR))/pjnath/lib
PJSUASIPLIBDIR = $(strip $(BASEDIR))/pjsip/lib


PJSUAINCLUDES = -I. -I$(PJSUALIBINCDIR) -I$(PJSUALIBUTILINCDIR) -I$(PJSUAMEDIAINCDIR) -I$(PJSUANATINCDIR) -I$(PJSUASIPINCDIR)
PJSUALIBS = -L$(PJSUALIBLIBDIR) -L$(PJSUALIBUTILLIBDIR) -L$(PJSUAMEDIALIBDIR) -L$(PJSUANATLIBDIR) -L$(PJSUASIPLIBDIR)

# compiler options
CXX = gcc
CXXFLAGS = $(PJSUAINCLUDES) $(PJSUALIBS)

# file dependencies
SRC = sipClient.c
LIB = -lpj-i686-pc-linux-gnu -lpjlib-util-i686-pc-linux-gnu -lpjmedia-audiodev-i686-pc-linux-gnu -lpjmedia-codec-i686-pc-linux-gnu  -lpjmedia-i686-pc-linux-gnu -lpjsdp-i686-pc-linux-gnu -lpjnath-i686-pc-linux-gnu -lpjsip-i686-pc-linux-gnu  -lpjsip-simple-i686-pc-linux-gnu -lpjsip-ua-i686-pc-linux-gnu -lpjsua-i686-pc-linux-gnu -lpthread
OBJ = $(addsuffix .o, $(basename $(SRC)))

# suffix rules
.SUFFIXES: .c

.c.o:
        $(CXX) $(CXXFLAGS) -c $<
.c :
        $(CXX) $(CXXFLAGS) $< -o $@ $(LIB)

sipClient: $(OBJ)
        $(CXX) $(CXXFLAGS) -o $@ $(OBJ) $(LIB)

# other dependencies
depend:
        makedepend $(CXXFLAGS)

#cleanup
clean:
        rm -f $(OBJ)

                         
TIA,
Vin



[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