I recall that I simply undef'd "interface" in my fork of the JDK to get it to compile with gcc, would be great if this could be fixed, as I'm fairly certain Visual C++ does not have this issue, strangely enough
best regards, Julian On Wed, Dec 21, 2022 at 1:06 PM Biswapriyo Nath <nathbap...@gmail.com> wrote: > In various headers, the name 'interface' is a macro which is defined > to 'struct' keyword. But that causes problem in code where 'interface' > is used as a variable name. Here are the list of headers in mingw-w64 > > ``` > $ grep -r "define interface" > basetyps.h:#define interface __STRUCT__ > basetyps.h:#define interface struct > combaseapi.h:#define interface __STRUCT__ > combaseapi.h:#define interface struct > rpc.h:#define interface struct > windows.h:#define interface struct > ``` > > Even a simple code like the following causes error > > ``` > #include <windows.h> > > int main() { > int interface = 0; > } > ``` > > The same is true in Windows SDK. But I have seen some projects[1] > which use MSVC with that 'interface' name as a variable. So, How can I > troubleshoot the issue in mingw-w64? > > [1]: > https://android-review.googlesource.com/c/platform/system/core/+/2266083 > > > _______________________________________________ > Mingw-w64-public mailing list > Mingw-w64-public@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public > _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public