Edward-Wu / srt-live-server

srt live server for low latency
Other
657 stars 197 forks source link

make error #139

Open mici1708 opened 2 months ago

mici1708 commented 2 months ago

Hi i use ubuntu 24.04 LTS on vmware workstation. When run command make on srt-live-server directory give me this error:

g++ -c -g -w -fcompare-debug-second  slscore/common.cpp -o obj/common.o
slscore/common.cpp: In function ‘void sls_gettime_fmt(char*, int64_t, char*)’:
slscore/common.cpp:111:5: error: ‘time’ was not declared in this scope
  111 |     time (&rawtime);
      |     ^~~~
slscore/common.cpp:113:16: error: ‘localtime’ was not declared in this scope
  113 |     timeinfo = localtime (&rawtime);
      |                ^~~~~~~~~
slscore/common.cpp:114:5: error: ‘strftime’ was not declared in this scope
  114 |     strftime(timef, sizeof(timef), fmt, timeinfo);
      |     ^~~~~~~~
make: *** [Makefile:61: obj/common.o] Errore 1
yuchen111 commented 3 weeks ago

Add #include to the file where the error occurs

ubiqbroadcasting commented 3 weeks ago

I am facing the same issue, any resolution please

WhiteWind4 commented 1 week ago

add #include to slscore/common.cpp