如何调试pjsip静态库源代码

时间:2019-03-21 05:09:44

标签: pjsip

我使用此配置编译了pjsip 2.8

./configure CXXFLAGS="-O3 -DNDEBUG" --prefix=/usr/pjproject-2.8
make dep & make
make install

我在CLion 2018.3.4中测试了simpleua.c,它可以工作,但不能调试pjsip静态库源代码,我是gcc的新手,不熟悉调试外部静态库。

CMakeLists.txt

cmake_minimum_required(VERSION 3.13)
project(Ivr)

set(CMAKE_CXX_STANDARD 14 )
set(CMAKE_CXX_FLAGS "-lasound -g")

aux_source_directory(. SRC_LIST)


include(FindPkgConfig REQUIRED)

if(PKG_CONFIG_FOUND)
    pkg_check_modules(PJSIP REQUIRED libpjproject)
else()
    message(SEND_ERROR "PkgConfig not found")
endif()


include_directories(${PJSIP_INCLUDE_DIRS})
link_directories(${PJSIP_LIBRARY_DIRS})

add_executable(${PROJECT_NAME} ${SRC_LIST})

target_link_libraries(${PROJECT_NAME} ${PJSIP_LIBRARIES})

libpjproject.pc

# Package Information for pkg-config

prefix=/usr/pjproject-2.8
exec_prefix=${prefix}
libdir=/usr/pjproject-2.8/lib
includedir=/usr/pjproject-2.8/include

Name: libpjproject
Description: Multimedia communication library
URL: http://www.pjsip.org
Version: 2.8
Libs: -L${libdir} -lpjsua2-x86_64-unknown-linux-gnu -lstdc++ -lpjsua-x86_64- 
unknown-linux-gnu -lpjsip-ua-x86_64-unknown-linux-gnu -lpjsip-simple-x86_64- 
unknown-linux-gnu -lpjsip-x86_64-unknown-linux-gnu -lpjmedia-codec-x86_64- 
unknown-linux-gnu -lpjmedia-x86_64-unknown-linux-gnu -lpjmedia-videodev- 
x86_64-unknown-linux-gnu -lpjmedia-audiodev-x86_64-unknown-linux-gnu - 
lpjmedia-x86_64-unknown-linux-gnu -lpjnath-x86_64-unknown-linux-gnu -lpjlib- 
util-x86_64-unknown-linux-gnu  -lsrtp-x86_64-unknown-linux-gnu -lresample- 
x86_64-unknown-linux-gnu -lg729codec-x86_64-unknown-linux-gnu -lgsmcodec- 
x86_64-unknown-linux-gnu -lspeex-x86_64-unknown-linux-gnu -lilbccodec-x86_64- 
unknown-linux-gnu -lg7221codec-x86_64-unknown-linux-gnu -lyuv-x86_64-unknown- 
linux-gnu -lwebrtc-x86_64-unknown-linux-gnu  -lpj-x86_64-unknown-linux-gnu - 
lssl -lcrypto -lm -lrt -lpthread  -lasound  
Cflags: -I${includedir} -O3 -DNDEBUG -I/usr/pjproject-2.8/include - 
DPJ_AUTOCONF=1 -O2 -DPJ_IS_BIG_ENDIAN=0 -DPJ_IS_LITTLE_ENDIAN=1

0 个答案:

没有答案