[Development] suggested change to Q_INIT_RESOURCES

Thiago Macieira thiago.macieira at intel.com
Wed Nov 19 02:56:00 CET 2025


On Tuesday, 18 November 2025 11:54:38 Pacific Standard Time Scott Bloom wrote:
> Currently the macro declares the function qInitResource_XXXX with
> 
> extern int QT_MANGLE_NAMESPACE( qInitResource_ ## name )()
>
> I would like to suggest its changed to
> 
> extern “C++” int QT_MANGLE_NAMESPACE( qInitResource_ ## name )()
[snip]
> Changing the macro would fix this with zero downside.
> 
> Thought?

It doesn't compile. Use of extern "C++" there is not allowed by the language.
 https://gcc.godbolt.org/z/Kjrvb3bfv

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Principal Engineer - Intel DCG - Platform & Sys. Eng.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5150 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20251118/ef1eaeb0/attachment.bin>


More information about the Development mailing list