我是 PJSIP
的新手,我很难使用它
我只需在 PJNATH
中使用 STUN
来实施 java application
。我使用的是 Java Native Acess
我正在构建来自 pjnath/src/pjnath
文件的所以文件。但是要获得很多 undefined symbolises
谁能帮我吗?
我正在使用命令:
gcc -Wall -g -shared -o lib_stun_msg.so -fPIC stun_msg.c -Wl,-z,defs
输出:
tmp/ccWs4a8W.o: In function `pj_pool_zalloc':
/usr/include/pj/pool.h:485: undefined reference to `pj_pool_calloc'
/tmp/ccWs4a8W.o: In function `pj_stun_get_err_reason':
/home/rashed/Documents/lib/stun_msg.c:724: undefined reference to `pj_str'
/home/rashed/Documents/lib/stun_msg.c:726: undefined reference to `pj_str'
/tmp/ccWs4a8W.o: In function `pj_stun_sockaddr_attr_init':
/home/rashed/Documents/lib/stun_msg.c:829: undefined reference to `pj_sockaddr_get_addr_len'
/tmp/ccWs4a8W.o: In function `decode_sockaddr_attr':
/home/rashed/Documents/lib/stun_msg.c:912: undefined reference to `PJ_AF_INET'
/home/rashed/Documents/lib/stun_msg.c:917: undefined reference to `PJ_AF_INET6'
/home/rashed/Documents/lib/stun_msg.c:925: undefined reference to `pj_sockaddr_init'
/home/rashed/Documents/lib/stun_msg.c:926: undefined reference to `pj_sockaddr_set_port'
/home/rashed/Documents/lib/stun_msg.c:928: undefined reference to `pj_sockaddr_get_addr'
/tmp/ccWs4a8W.o: In function `decode_xored_sockaddr_attr':
/home/rashed/Documents/lib/stun_msg.c:955: undefined reference to `PJ_AF_INET'
/home/rashed/Documents/lib/stun_msg.c:956: undefined reference to `pj_htons'
/home/rashed/Documents/lib/stun_msg.c:957: undefined reference to `pj_htonl'
/home/rashed/Documents/lib/stun_msg.c:958: undefined reference to `PJ_AF_INET6'
/home/rashed/Documents/lib/stun_msg.c:961: undefined reference to `pj_htonl'
/home/rashed/Documents/lib/stun_msg.c:963: undefined reference to `pj_htons'
/tmp/ccWs4a8W.o: In function `encode_sockaddr_attr':
/home/rashed/Documents/lib/stun_msg.c:1004: undefined reference to `PJ_AF_INET'
/home/rashed/Documents/lib/stun_msg.c:1030: undefined reference to `pj_htons'
/home/rashed/Documents/lib/stun_msg.c:1031: undefined reference to `pj_htonl'
/home/rashed/Documents/lib/stun_msg.c:1053: undefined reference to `PJ_AF_INET6'
/home/rashed/Documents/lib/stun_msg.c:1077: undefined reference to `pj_htonl'
/home/rashed/Documents/lib/stun_msg.c:1081: undefined reference to `pj_htons'
/tmp/ccWs4a8W.o: In function `clone_sockaddr_attr':
/home/rashed/Documents/lib/stun_msg.c:1123: undefined reference to `pj_pool_alloc'
/tmp/ccWs4a8W.o: In function `pj_stun_string_attr_init':
/home/rashed/Documents/lib/stun_msg.c:1144: undefined reference to `pj_strdup'
/tmp/ccWs4a8W.o: In function `decode_string_attr':
/home/rashed/Documents/lib/stun_msg.c:1210: undefined reference to `pj_strdup'
/tmp/ccWs4a8W.o: In function `clone_string_attr':
/home/rashed/Documents/lib/stun_msg.c:1277: undefined reference to `pj_pool_alloc'
/home/rashed/Documents/lib/stun_msg.c:1280: undefined reference to `pj_strdup'
/tmp/ccWs4a8W.o: In function `clone_empty_attr':
/home/rashed/Documents/lib/stun_msg.c:1378: undefined reference to `pj_pool_alloc'
/tmp/ccWs4a8W.o: In function `clone_uint_attr':
/home/rashed/Documents/lib/stun_msg.c:1480: undefined reference to `pj_pool_alloc'
/tmp/ccWs4a8W.o: In function `clone_uint64_attr':
/home/rashed/Documents/lib/stun_msg.c:1582: undefined reference to `pj_pool_alloc'
/tmp/ccWs4a8W.o: In function `clone_msgint_attr':
/home/rashed/Documents/lib/stun_msg.c:1682: undefined reference to `pj_pool_alloc'
/tmp/ccWs4a8W.o: In function `pj_stun_errcode_attr_create':
/home/rashed/Documents/lib/stun_msg.c:1721: undefined reference to `pj_strdup'
/tmp/ccWs4a8W.o: In function `decode_errcode_attr':
/home/rashed/Documents/lib/stun_msg.c:1766: undefined reference to `pj_strdup'
/tmp/ccWs4a8W.o: In function `clone_errcode_attr':
/home/rashed/Documents/lib/stun_msg.c:1810: undefined reference to `pj_pool_alloc'
/home/rashed/Documents/lib/stun_msg.c:1813: undefined reference to `pj_strdup'
/tmp/ccWs4a8W.o: In function `decode_unknown_attr':
/home/rashed/Documents/lib/stun_msg.c:1900: undefined reference to `pj_ntohs'
/tmp/ccWs4a8W.o: In function `encode_unknown_attr':
/home/rashed/Documents/lib/stun_msg.c:1933: undefined reference to `pj_htons'
/tmp/ccWs4a8W.o: In function `clone_unknown_attr':
/home/rashed/Documents/lib/stun_msg.c:1945: undefined reference to `pj_pool_alloc'
/tmp/ccWs4a8W.o: In function `pj_stun_binary_attr_init':
/home/rashed/Documents/lib/stun_msg.c:1974: undefined reference to `pj_pool_alloc'
/tmp/ccWs4a8W.o: In function `decode_binary_attr':
/home/rashed/Documents/lib/stun_msg.c:2037: undefined reference to `pj_pool_alloc'
/tmp/ccWs4a8W.o: In function `clone_binary_attr':
/home/rashed/Documents/lib/stun_msg.c:2078: undefined reference to `pj_pool_alloc'
/home/rashed/Documents/lib/stun_msg.c:2083: undefined reference to `pj_pool_alloc'
/tmp/ccWs4a8W.o: In function `pj_stun_msg_init':
/home/rashed/Documents/lib/stun_msg.c:2119: undefined reference to `pj_rand'
/home/rashed/Documents/lib/stun_msg.c:2121: undefined reference to `pj_getpid'
/home/rashed/Documents/lib/stun_msg.c:2122: undefined reference to `pj_rand'
/tmp/ccWs4a8W.o: In function `pj_stun_msg_check':
/home/rashed/Documents/lib/stun_msg.c:2238: undefined reference to `pj_crc32_calc'
/tmp/ccWs4a8W.o: In function `pj_stun_msg_decode':
/home/rashed/Documents/lib/stun_msg.c:2331: undefined reference to `pj_ntohs'
/home/rashed/Documents/lib/stun_msg.c:2332: undefined reference to `pj_ntohs'
/home/rashed/Documents/lib/stun_msg.c:2333: undefined reference to `pj_ntohl'
/home/rashed/Documents/lib/stun_msg.c:2365: undefined reference to `pj_log_get_level'
/home/rashed/Documents/lib/stun_msg.c:2365: undefined reference to `pj_log_4'
/home/rashed/Documents/lib/stun_msg.c:2383: undefined reference to `pj_log_get_level'
/home/rashed/Documents/lib/stun_msg.c:2383: undefined reference to `pj_log_5'
/home/rashed/Documents/lib/stun_msg.c:2426: undefined reference to `pj_log_get_level'
/home/rashed/Documents/lib/stun_msg.c:2426: undefined reference to `pj_log_4'
/home/rashed/Documents/lib/stun_msg.c:2445: undefined reference to `pj_strerror'
/home/rashed/Documents/lib/stun_msg.c:2462: undefined reference to `pj_log_get_level'
/home/rashed/Documents/lib/stun_msg.c:2462: undefined reference to `pj_log_4'
/home/rashed/Documents/lib/stun_msg.c:2536: undefined reference to `pj_log_get_level'
/home/rashed/Documents/lib/stun_msg.c:2536: undefined reference to `pj_log_4'
/tmp/ccWs4a8W.o: In function `pj_stun_msg_encode':
/home/rashed/Documents/lib/stun_msg.c:2730: undefined reference to `pj_hmac_sha1_init'
/home/rashed/Documents/lib/stun_msg.c:2732: undefined reference to `pj_hmac_sha1_update'
/home/rashed/Documents/lib/stun_msg.c:2742: undefined reference to `pj_hmac_sha1_final'
/home/rashed/Documents/lib/stun_msg.c:2763: undefined reference to `pj_crc32_calc'
collect2: error: ld returned 1 exit status