I won't be offended if you revert it.

I'm not sure what your shell commands do, but as long as there is one GUID
defined in one header file, and the selectany attribute is not used
properly, you can get multiple definition errors, because that header file
could be used in multiple translation units in conjunction with initguid.h.

It sounds like guiddef.h should probably check the GCC major version.
Based on the tests people have reported in this thread, I would guess that
for GCC 6 and above the selectany attribute on the declaration is required,
while on GCC 5 and below the selectany attribute on the declaration is
forbidden. Or we could get fancy and add a test to the configure script to
figure out which is the case.

--David Grayson

On Tue, May 2, 2017 at 7:49 PM, Liu Hao <lh_mo...@126.com> wrote:

> On 2017/5/3 9:33, Liu Hao wrote:
> > Kai, should we revert it? We have to deal with the multiple definition
> > error thereafter.
> >
> A number of UUIDs/GUIDs are suffering from such multiple definitions,
> which can be discovered using the following commands:
>
> ```bash
> grep -EhrI '^DEFINE_(GUID|OLEGUID)' |
>    sed -r 's@^DEFINE_(GUID|OLEGUID)\s*\((\w+)\s*,.*$@\2@' |
>    sort |
>    tee uuids-all.txt |
>    uniq > uuids-uniq.txt
> diff -U0 uuids-all.txt uuids-uniq.txt | grep -v '^@@'
> ```
>
> This outputs 106 redundant definitions at the moment.
>
> --
> Best regards,
> LH_Mouse
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to