Edward-Wu / srt-live-server

srt live server for low latency
Other
644 stars 192 forks source link

Compiling issue #100

Open Quiet20 opened 3 years ago

Quiet20 commented 3 years ago

hi, I got a compiling issue here .. can you help? maybe i missed something (I am new to linux)

g++ -c -g slscore/SLSLog.cpp -o obj/SLSLog.o In file included from slscore/SLSLog.hpp:32:0, from slscore/SLSLog.cpp:31: slscore/common.hpp:136:1: warning: ‘typedef’ was ignored in this declaration }; ^ slscore/SLSLog.cpp: In constructor ‘CSLSLog::CSLSLog()’: slscore/SLSLog.cpp:40:29: warning: zero-length gnu_printf format string [-Wformat-zero-length] sprintf(log_filename, ""); ^ slscore/SLSLog.cpp: In member function ‘void CSLSLog::print_log(int, const char, __va_list_tag)’: slscore/SLSLog.cpp:84:64: warning: deprecated conversion from string constant to ‘char’ [-Wwrite-strings] sls_gettime_fmt(cur_time, cur_time_sec, "%Y-%m-%d %H:%M:%S"); ^ slscore/SLSLog.cpp:88:20: warning: format not a string literal and no format arguments [-Wformat-security] printf(buf_info); ^ slscore/SLSLog.cpp: In static member function ‘static void CSLSLog::set_log_level(char)’: slscore/SLSLog.cpp:105:70: warning: too many arguments for format [-Wformat-extra-args] printf("set log level='%s'.\n" , level, LOG_LEVEL_NAME[i]); ^ g++ -c -g slscore/common.cpp -o obj/common.o In file included from slscore/common.cpp:48:0: slscore/common.hpp:136:1: warning: ‘typedef’ was ignored in this declaration }; ^ slscore/common.cpp: In function ‘void sls_gettime_default_string(char)’: slscore/common.cpp:102:64: warning: deprecated conversion from string constant to ‘char’ [-Wwrite-strings] sls_gettime_fmt(cur_time, cur_time_sec, "%Y-%m-%d %H:%M:%S"); ^ slscore/common.cpp: In function ‘int sls_send_cmd(const char)’: slscore/common.cpp:400:58: warning: too many arguments for format [-Wformat-extra-args] printf("sls_send_cmd failed, pid is invalid.\n", pid); ^ g++ -c -g slscore/conf.cpp -o obj/conf.o In file included from slscore/conf.cpp:33:0: slscore/common.hpp:136:1: warning: ‘typedef’ was ignored in this declaration }; ^ slscore/conf.cpp:38:50: warning: deprecated conversion from string constant to ‘char’ [-Wwrite-strings] sls_conf_base_t sls_first_conf = {"", NULL, NULL} ; ^ g++ -c -g slscore/SLSThread.cpp -o obj/SLSThread.o In file included from slscore/SLSLog.hpp:32:0, from slscore/SLSThread.cpp:31: slscore/common.hpp:136:1: warning: ‘typedef’ was ignored in this declaration }; ^ g++ -c -g slscore/SLSEpollThread.cpp -o obj/SLSEpollThread.o In file included from slscore/SLSEpollThread.cpp:30:0: slscore/SLSEpollThread.hpp:29:21: fatal error: srt/srt.h: No such file or directory compilation terminated. Makefile:61: recipe for target 'obj/SLSEpollThread.o' failed make: *** [obj/SLSEpollThread.o] Error 1

Edward-Wu commented 2 years ago

slscore/SLSEpollThread.hpp:29:21: fatal error: srt/srt.h: No such file or directory

Please following the document, install the SRT library first.