2017-11-27 8 views
0
gcc -Iinclude/ -Isrc/ -Wall -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -c ./src/utils.c -o obj/utils.o 

./src/utils.c:29:5: warning: implicit declaration of function 'clock_gettime' is invalid in C99 [-Wimplicit-function-declaration] 
    clock_gettime(CLOCK_REALTIME, &now); 
    ^

./src/utils.c:29:19: fatal error: use of undeclared identifier 'CLOCK_REALTIME' 
clock_gettime(CLOCK_REALTIME, &now); 
      ^

경고 및 1 오류가 발생했습니다. make : *** [obj/utils.o] 오류 1Mac에서 darknet YOLO 라이브러리에서 'make'명령을 실행하는 동안 오류가 발생했습니다.

답변

1

clock_gettime 기능은 MacOS에서 사용할 수 없습니다. 따라서 다른 방법을 사용하려면 코드를 다시 작성해야합니다.