Re: [Mingw-w64-public] [PATCH] Revert "Avoid declaring something extern AND initializing it
Hello dw, please go ahead and apply your patch. Thanks for your work, Kai 2016-09-20 21:35 GMT+02:00 Mario Emmenlauer : > > I can confirm that the patch works for me with gcc-6.1.0 to build qt5. > > Thanks! Mario > > > On 17.09.2016 23:56, David Wohlferd wrote: >> It took me a bit to figure out the difference between my test code (which >> requires the patch) and yours (which can't have it). It was subtle. >> >> Try this patch (attached). >> >> dw >> >> On 9/16/2016 1:39 AM, Mateusz wrote: >>> Hello, >>> Since this commit I'm not able to compile Qt5 with GCC 6.1.0 and 6.2.0 >>> errors: >>> >>> In file included from >>> D:/msys64/mingw64/x86_64-w64-mingw32/include/mfidl.h:73:0, >>> from example.cc:1: >>> D:/msys64/mingw64/x86_64-w64-mingw32/include/mftransform.h:709:47: error: >>> 'selectany' attribute applies only to initialized variables with external >>> linkage >>> EXTERN_C const DECLSPEC_SELECTANY PROPERTYKEY MFPKEY_CLSID = >>> {{0xc57a84c0,0x1a80,0x40a3,{0x97,0xb5,0x92,0x72,0xa4,0x3,0xc8,0xae}}, 0x01}; >>> ^~~~ > > > > -- > ___ > 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
Re: [Mingw-w64-public] [PATCH] Revert "Avoid declaring something extern AND initializing it
I can confirm that the patch works for me with gcc-6.1.0 to build qt5. Thanks! Mario On 17.09.2016 23:56, David Wohlferd wrote: > It took me a bit to figure out the difference between my test code (which > requires the patch) and yours (which can't have it). It was subtle. > > Try this patch (attached). > > dw > > On 9/16/2016 1:39 AM, Mateusz wrote: >> Hello, >> Since this commit I'm not able to compile Qt5 with GCC 6.1.0 and 6.2.0 >> errors: >> >> In file included from >> D:/msys64/mingw64/x86_64-w64-mingw32/include/mfidl.h:73:0, >> from example.cc:1: >> D:/msys64/mingw64/x86_64-w64-mingw32/include/mftransform.h:709:47: error: >> 'selectany' attribute applies only to initialized variables with external >> linkage >> EXTERN_C const DECLSPEC_SELECTANY PROPERTYKEY MFPKEY_CLSID = >> {{0xc57a84c0,0x1a80,0x40a3,{0x97,0xb5,0x92,0x72,0xa4,0x3,0xc8,0xae}}, 0x01}; >> ^~~~ -- ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] Revert \"Avoid declaring something extern AND initializing it
Patch is ok. Please go aheah. Thanks, Kai 2016-09-19 7:09 GMT+02:00 David Wohlferd : > I assume someone still needs to approve this before I push? > > dw > > On 9/18/2016 6:10 AM, Mateusz wrote: >> Hello, >> While I'm not able to reply to the mailing list directly (forgot to >> subscribe). Please discard my patch and commit your new patch. >> Thank you for your help! >> Best regards, >> Mateusz > > > -- > ___ > 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
Re: [Mingw-w64-public] [PATCH] Revert \"Avoid declaring something extern AND initializing it
I assume someone still needs to approve this before I push? dw On 9/18/2016 6:10 AM, Mateusz wrote: > Hello, > While I'm not able to reply to the mailing list directly (forgot to > subscribe). Please discard my patch and commit your new patch. > Thank you for your help! > Best regards, > Mateusz -- ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] Revert "Avoid declaring something extern AND initializing it
It took me a bit to figure out the difference between my test code (which requires the patch) and yours (which can't have it). It was subtle. Try this patch (attached). dw On 9/16/2016 1:39 AM, Mateusz wrote: Hello, Since this commit I'm not able to compile Qt5 with GCC 6.1.0 and 6.2.0 errors: In file included from D:/msys64/mingw64/x86_64-w64-mingw32/include/mfidl.h:73:0, from example.cc:1: D:/msys64/mingw64/x86_64-w64-mingw32/include/mftransform.h:709:47: error: 'selectany' attribute applies only to initialized variables with external linkage EXTERN_C const DECLSPEC_SELECTANY PROPERTYKEY MFPKEY_CLSID = {{0xc57a84c0,0x1a80,0x40a3,{0x97,0xb5,0x92,0x72,0xa4,0x3,0xc8,0xae}}, 0x01}; ^~~~ diff --git a/mingw-w64-headers/include/mftransform.h b/mingw-w64-headers/include/mftransform.h index 4738b4a..954c861 100644 --- a/mingw-w64-headers/include/mftransform.h +++ b/mingw-w64-headers/include/mftransform.h @@ -701,7 +701,7 @@ void __RPC_STUB IMFTransform_ProcessMessage_Stub( #endif /* __IMFTransform_INTERFACE_DEFINED__ */ -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__cplusplus) #undef EXTERN_C #define EXTERN_C #endif diff --git a/mingw-w64-headers/include/mftransform.idl b/mingw-w64-headers/include/mftransform.idl index 11d5988..bea0182 100644 --- a/mingw-w64-headers/include/mftransform.idl +++ b/mingw-w64-headers/include/mftransform.idl @@ -145,7 +145,7 @@ interface IMFTransform : IUnknown /* In gcc, declaring something 'extern' and then initializing it generates a warning. */ -cpp_quote("#ifdef __GNUC__") +cpp_quote("#if defined(__GNUC__) && !defined(__cplusplus)") cpp_quote("#undef EXTERN_C") cpp_quote("#define EXTERN_C") cpp_quote("#endif") -- ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public