우분투 C++ error: undefined reference to 'clock_gettime' and 'clock_settime'
조회수 2990회
소스코드
#include <iostream>
#include <time.h>
using namespace std;
int main()
{
timespec time1, time2;
int temp;
clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &time1);
//뭔가 한당
clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &time2);
return 0;
}
발생하는 문제 및 실행환경
학교컴퓨터에서 했을 때는 잘 됐는데 제 노트북(우분투)에서 하니까 에러가 떠요
이럴 땐 어떻게 해야될지 모르겠어요 ㅜㅜㅜ
댓글 입력