Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

could not build on Windows -> error: expected ‘;’ before ‘extern’ #1525

Open
scottxu007 opened this issue Jan 26, 2024 · 1 comment

Comments

@scottxu007
Copy link

$ make
make all-recursive
make[1]: Entering directory '/home/libimobiledevice'
Making all in 3rd_party
make[2]: Entering directory '/home/libimobiledevice/3rd_party'
Making all in ed25519
make[3]: Entering directory '/home/libimobiledevice/3rd_party/ed25519'
CC add_scalar.lo
In file included from /mingw64/include/_cygwin.h:14,
from /mingw64/include/_mingw.h:15,
from /mingw64/include/corecrt.h:10,
from /mingw64/include/crtdefs.h:10,
from /mingw64/include/stddef.h:7,
from ed25519.h:4,
from add_scalar.c:1:
/mingw64/include/stddef.h:18:10: error: expected ‘;’ before ‘extern’
18 | _CRTIMP extern int *__cdecl _errno(void);
| ^~~~~~~
| ;
/mingw64/include/stddef.h:20:3: warning: data definition has no type or storage class
20 | errno_t __cdecl _set_errno(int _Value);
| ^~~~~~~
/mingw64/include/stddef.h:20:3: warning: type defaults to ‘int’ in declaration of ‘errno_t’ [-Wimplicit-int]
/mingw64/include/stddef.h:20:3: warning: ‘cdecl’ attribute only applies to function types [-Wattributes]
/mingw64/include/stddef.h:20:19: error: expected ‘,’ or ‘;’ before ‘_set_errno’
20 | errno_t __cdecl _set_errno(int _Value);
| ^~~~~~~~~~
/mingw64/include/stddef.h:21:3: warning: data definition has no type or storage class
21 | errno_t __cdecl _get_errno(int *_Value);
| ^~~~~~~
/mingw64/include/stddef.h:21:3: warning: type defaults to ‘int’ in declaration of ‘errno_t’ [-Wimplicit-int]
/mingw64/include/stddef.h:21:3: warning: ‘cdecl’ attribute only applies to function types [-Wattributes]
/mingw64/include/stddef.h:21:3: warning: redundant redeclaration of ‘errno_t’ [-Wredundant-decls]
/mingw64/include/stddef.h:20:3: note: previous declaration of ‘errno_t’ with type ‘int’
20 | errno_t __cdecl _set_errno(int _Value);
| ^~~~~~~
/mingw64/include/stddef.h:21:19: error: expected ‘,’ or ‘;’ before ‘_get_errno’
21 | errno_t __cdecl _get_errno(int *_Value);
| ^~~~~~~~~~
/mingw64/include/stddef.h:24:10: error: expected ‘;’ before ‘extern’
24 | _CRTIMP extern unsigned long __cdecl __threadid(void);
| ^~~~~~~
| ;
/mingw64/include/stddef.h:26:10: error: expected ‘;’ before ‘extern’
26 | _CRTIMP extern uintptr_t __cdecl __threadhandle(void);
| ^~~~~~~
| ;
/mingw64/include/stddef.h:26:18: warning: type defaults to ‘int’ in declaration of ‘uintptr_t’ [-Wimplicit-int]
26 | _CRTIMP extern uintptr_t __cdecl __threadhandle(void);
| ^~~~~~~~~
/mingw64/include/stddef.h:26:3: warning: ‘cdecl’ attribute only applies to function types [-Wattributes]
26 | _CRTIMP extern uintptr_t __cdecl __threadhandle(void);
| ^~~~~~~
/mingw64/include/stddef.h:26:36: error: expected ‘,’ or ‘;’ before ‘__threadhandle’
26 | _CRTIMP extern uintptr_t __cdecl __threadhandle(void);
| ^~~~~~~~~~~~~~
In file included from /mingw64/include/crtdefs.h:10,
from /mingw64/include/stddef.h:7,
from ed25519.h:4,
from add_scalar.c:1:
/mingw64/include/corecrt.h:113:13: error: ‘errno_t’ redeclared as different kind of symbol
113 | typedef int errno_t;
| ^~~~~~~
In file included from /mingw64/include/_cygwin.h:14,
from /mingw64/include/_mingw.h:15,
from /mingw64/include/corecrt.h:10,
from /mingw64/include/crtdefs.h:10,
from /mingw64/include/stddef.h:7,
from ed25519.h:4,
from add_scalar.c:1:
/mingw64/include/stddef.h:21:3: note: previous declaration of ‘errno_t’ with type ‘int’
21 | errno_t __cdecl _get_errno(int *_Value);
| ^~~~~~~
make[3]: *** [Makefile:441: add_scalar.lo] Error 1
make[3]: Leaving directory '/home/libimobiledevice/3rd_party/ed25519'
make[2]: *** [Makefile:413: all-recursive] Error 1
make[2]: Leaving directory '/home/libimobiledevice/3rd_party'
make[1]: *** [Makefile:467: all-recursive] Error 1
make[1]: Leaving directory '/home/libimobiledevice'
make: *** [Makefile:397: all] Error 2

Does someone have an idea? Thanks

@mexmer
Copy link

mexmer commented Jan 26, 2024

what build environment are you using?
it's weird it doesn't have either definition for _CRTIMP or errno_t

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants