在 2022-06-11 21:10, Biswapriyo Nath 写道:
After adding #define WIDL_C_INLINE_WRAPPERS, this is shown: error: multiple storage classes in in declaration specifiers
I think this is caused by
static FORCEINLINE ULONG IUnknown_AddRef(IUnknown* This) {
which contains `FORCEINLINE`, defined in 'winnt.h' as
#define FORCEINLINE __forceinline
which contains `__forceinline`, defined in '_mingw.h' as
#define __forceinline extern __inline__
__attribute__((__always_inline__,__gnu_inline__))
which results in `static extern __inline__ ...` and is thus invalid.
The combination of `extern` with `__gnu_inline__` is necessary to suppress generation of a function
body if the attached function could not be inlined when compiling as C99. I don't think there is
anything we can do with these headers. Perhaps WIDL should not generate `static` for `FORCEINLINE`
functions; or, if that is not an option, `static __inline__` might be a better alternative.
-- Best regards, LIU Hao
OpenPGP_signature
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
