Commit 30aa71cb by xiongziliang

修复编译问题

parent bec36b25
...@@ -113,6 +113,10 @@ if(NOT WIN32) ...@@ -113,6 +113,10 @@ if(NOT WIN32)
add_compile_options(-Wno-predefined-identifier-outside-function) add_compile_options(-Wno-predefined-identifier-outside-function)
endif() endif()
if(WIN32)
list(APPEND LINK_LIB_LIST ws2_32)
endif()
#编译动态库 #编译动态库
if(NOT IOS AND NOT ANDROID) if(NOT IOS AND NOT ANDROID)
add_library(${CMAKE_PROJECT_NAME}_shared SHARED ${SRC_LIST}) add_library(${CMAKE_PROJECT_NAME}_shared SHARED ${SRC_LIST})
......
...@@ -19,8 +19,9 @@ ...@@ -19,8 +19,9 @@
#define MIN_LOG2_MAX_FRAME_NUM 4 #define MIN_LOG2_MAX_FRAME_NUM 4
#define H264_MAX_PICTURE_COUNT 36 #define H264_MAX_PICTURE_COUNT 36
#define CODEC_FLAG2_IGNORE_CROP 0x00010000 ///< Discard cropping information from SPS. #define CODEC_FLAG2_IGNORE_CROP 0x00010000 ///< Discard cropping information from SPS.
#ifndef INT_MAX
#define INT_MAX 65535 #define INT_MAX 65535
#endif //INT_MAX
/* report level */ /* report level */
#define RPT_ERR (1) // error, system error #define RPT_ERR (1) // error, system error
......
...@@ -39,7 +39,7 @@ foreach(TEST_SRC ${TEST_SRC_LIST}) ...@@ -39,7 +39,7 @@ foreach(TEST_SRC ${TEST_SRC_LIST})
if(ANDROID) if(ANDROID)
target_link_libraries(${TEST_EXE_NAME} ${CMAKE_PROJECT_NAME}_static ${LINK_LIB_LIST}) target_link_libraries(${TEST_EXE_NAME} ${CMAKE_PROJECT_NAME}_static ${LINK_LIB_LIST})
elseif(WIN32) elseif(WIN32)
target_link_libraries(${TEST_EXE_NAME} ${CMAKE_PROJECT_NAME}_shared ${LINK_LIB_LIST}) target_link_libraries(${TEST_EXE_NAME} ${CMAKE_PROJECT_NAME}_shared ${LINK_LIB_LIST} )
else() else()
target_link_libraries(${TEST_EXE_NAME} ${CMAKE_PROJECT_NAME}_shared ${LINK_LIB_LIST} pthread) target_link_libraries(${TEST_EXE_NAME} ${CMAKE_PROJECT_NAME}_shared ${LINK_LIB_LIST} pthread)
endif() endif()
......
...@@ -136,7 +136,7 @@ static onceToken s_token([](){ ...@@ -136,7 +136,7 @@ static onceToken s_token([](){
}, nullptr); }, nullptr);
#if !defined(SIGHUP) #if !defined(SIGHUP)
#defined SIGHUP 1 #define SIGHUP 1
#endif #endif
int main(int argc,char *argv[]) { int main(int argc,char *argv[]) {
...@@ -148,7 +148,10 @@ int main(int argc,char *argv[]) { ...@@ -148,7 +148,10 @@ int main(int argc,char *argv[]) {
Logger::Instance().add(std::make_shared<ConsoleChannel>("stdout", LTrace)); Logger::Instance().add(std::make_shared<ConsoleChannel>("stdout", LTrace));
Logger::Instance().setWriter(std::make_shared<AsyncLogWriter>()); Logger::Instance().setWriter(std::make_shared<AsyncLogWriter>());
//加载配置文件,如果配置文件不存在就创建一个 //加载配置文件,如果配置文件不存在就创建一个
InfoL << mINI::Instance().dump();
Config::loadIniConfig(); Config::loadIniConfig();
InfoL << mINI::Instance().dump();
{ {
//这里是拉流地址,支持rtmp/rtsp协议,负载必须是H264+AAC //这里是拉流地址,支持rtmp/rtsp协议,负载必须是H264+AAC
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论