在 2024-02-18 15:40, Julian Waters 写道:
In file included from C:/msys64/ucrt64/include/windows.h:70,
                  from try.c:4:
C:/msys64/ucrt64/include/winbase.h:1499:37: error: expected identifier
or '(' before 'LPSTR'
  1499 |   WINBASEAPI LPSTR WINAPI lstrcpyA (LPSTR lpString1, LPCSTR lpString2);
       |                                     ^~~~~

This file can be pre-processed with `gcc -E -dD`; and this line actually becomes

    __attribute__((dllimport)) LPSTR __attribute__((__stdcall__))
    lstrcpyA_instead_use_StringCbCopyA_or_StringCchCopyA; (LPSTR lpString1,
    LPCSTR lpString2);

which is due to this macro in <strsafe.h>:

   #define lstrcpyA lstrcpyA_instead_use_StringCbCopyA_or_StringCchCopyA;


These macros have been moved from <strsafe.h> to <dontuse.h> since Windows SDK 8.0. Maybe we should do the same.


--
Best regards,
LIU Hao

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to