Linux에서 빌드하고 제대로 실행되는 Microsoft Visual Studio 2008로 포팅하는 응용 프로그램이 있습니다.Linux에서 Visual Studio 2008 로의 API 포팅
#include <sys/types.h>
#include <sys/time.h>
typedef long long Usec;
inline Usec timevalToUsec(const timeval &tv)
{
return (((Usec) tv.tv_sec) * 1000000) + ((Usec) tv.tv_usec);
}
을하지만 컴파일러는 sys/time.h
헤더 파일에 실패 : 나는 시간 루틴에 문제가 있어요
내 리눅스 코드는 다음과 같습니다 나는에 포함 변경할 경우
fatal error C1083: Cannot open include file:
'sys/time.h': No such file or directory
error C4430: missing type specifier - int assumed.
Note: C++ does not support default-int
,536,913 : 단지
time.h
나는 정의되지 timeval 형과 다른 오류가
timeval
이 정의되지 않았기 때문입니다.
sys/time.h
대신 time.h
이 포함되어 있습니까? 그렇다면 Microsoft Visual Studio 2008에서 struct timeval
의 정의는 어디에서 얻을 수 있습니까?