我试图通过这种方式使用gstreamer-rtsp-server:
./configure
,make
,make install
进行编译和安装。gst-rtsp-server-1.6.0/examples/test-launch.c
)中的代码创建简单的CLion项目CMakeLists看起来像这样:
cmake_minimum_required(VERSION 3.3)
project(gst_RTSP_server)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
include(FindPkgConfig)
pkg_check_modules(GLIB glib-2.0 REQUIRED)
pkg_check_modules(GSTREAMER
REQUIRED gstreamer-1.0)
pkg_check_modules(GSTRTSP
gstreamer-rtsp-server-1.0)
include_directories(${GLIB_INCLUDE_DIRS})
include_directories(${GSTREAMER_INCLUDE_DIRS})
include_directories(${GSTRTSP_INCLUDE_DIRS})
set(SOURCE_FILES main.cpp)
add_executable(gst_RTSP_server ${SOURCE_FILES})
target_link_libraries(${PROJECT_NAME} ${GLIB_LIBRARIES})
target_link_libraries(${PROJECT_NAME} ${GSTREAMER_LIBRARIES})
target_link_libraries(${PROJECT_NAME} gstvideo-1.0)
target_link_libraries(${PROJECT_NAME} ${GSTRTSP_LIBRARIES})
毕竟我成功构建了我的项目,但是当我运行它时,我得到输出:
error while loading shared libraries: libgstrtspserver-1.0.so.0:
cannot open shared object file: No such file or directory
如何修复它并运行我的项目?