인터넷/IT/프로그래밍

ffmpeg 컴파일 시 c:\mingw\include\unistd.h:79:1: error: expected ',' or ';' before 'int' 오류 해결방안

coffee94 2015. 7. 22. 18:05

대략 아래처럼 오류가 뜬다면..

unistd.h 파일을 열어서 _cdecl 로 되어 있는 부분을 __cdecl로 교체하면 정상적으로 컴파일이 됩니다.


c:\mingw\include\unistd.h:79:1: error: expected ',' or ';' before 'int'

 int __mingw_sleep( unsigned long, unsigned long );

 ^

c:\mingw\include\unistd.h:105:1: error: expected ',' or ';' before 'int'

 int nanosleep( const struct timespec *, struct timespec * );

 ^

c:\mingw\include\unistd.h:125:28: error: expected ',' or ';' before 'usleep'

 int _cdecl __MINGW_NOTHROW usleep( useconds_t )__MINGW_ATTRIB_DEPRECATED;

                            ^

c:\mingw\include\unistd.h:138:10: error: conflicting types for '_cdecl'

 unsigned _cdecl __MINGW_NOTHROW sleep( unsigned );

          ^

c:\mingw\include\unistd.h:125:5: note: previous declaration of '_cdecl' was here

 int _cdecl __MINGW_NOTHROW usleep( useconds_t )__MINGW_ATTRIB_DEPRECATED;

     ^

c:\mingw\include\unistd.h:138:33: error: expected ',' or ';' before 'sleep'

 unsigned _cdecl __MINGW_NOTHROW sleep( unsigned );

                                 ^

c:\mingw\include\unistd.h:153:12: error: expected '=', ',', ';', 'asm' or '__att

ribute__' before 'ftruncate'

 int _cdecl ftruncate( int, off_t );