Closed fhurtak closed 1 year ago
When installing according to the README instructions, compliation fails at
$cmake --build . --config Release -- -j 16
with error
[ 96%] Building CXX object CMakeFiles/fictrac.dir/exec/fictrac.cpp.o /home/hurtak/.local/opt/fictrac/exec/fictrac.cpp: In function ‘int main(int, char)’: /home/hurtak/.local/opt/fictrac/exec/fictrac.cpp:95:10: error: call of overloaded ‘sleep(int)’ is ambiguous 95 | sleep(250); | ~^~~~~ In file included from /home/hurtak/.local/opt/fictrac/exec/fictrac.cpp:9: /home/hurtak/.local/opt/fictrac/include/timing.h:102:13: note: candidate: ‘void sleep(long int)’ 102 | static void sleep(long ms) | ^~~~~ In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24, from /usr/include/signal.h:328, from /usr/include/c++/11/csignal:42, from /home/hurtak/.local/opt/fictrac/exec/fictrac.cpp:14: /usr/include/unistd.h:464:21: note: candidate: ‘unsigned int sleep(unsigned int)’ 464 | extern unsigned int sleep (unsigned int __seconds); | ^~~~~ gmake[2]: ** [CMakeFiles/fictrac.dir/build.make:76: CMakeFiles/fictrac.dir/exec/fictrac.cpp.o] Error 1 gmake[1]: [CMakeFiles/Makefile2:139: CMakeFiles/fictrac.dir/all] Error 2 gmake: *** [Makefile:91: all] Error 2
The error is solved by editing the calls to sleep, explicitly setting the type of the values to unsigned int.
This is fixed in latest version (see #20)
When installing according to the README instructions, compliation fails at
with error
The error is solved by editing the calls to sleep, explicitly setting the type of the values to unsigned int.