sip-build using C compiler for .cpp files when not using pyqt-builder?

Patrick Stinson patrickkidd at gmail.com
Sat Oct 8 14:49:40 BST 2022


So then with:

extra-compile-args = ["-std=c++11"]

you get this for the .c files:

error: invalid argument '-std=c++11' not allowed with 'C'

On Sat, Oct 8, 2022 at 5:47 AM Patrick Stinson <patrickkidd at gmail.com>
wrote:

> Yeah, ok. It compiles fine on ubuntu. I think this is actually a problem
> in the default c++ spec for clang 14.0.0 on macos 12.6, for example these
> warnings and errors:
>
> warning: scoped enumerations are a C++11 extension [-Wc++11-extensions]
> error: unknown type name 'constexpr'
>
> On Fri, Oct 7, 2022 at 12:25 AM Phil Thompson <phil at riverbankcomputing.com>
> wrote:
>
>> On 06/10/2022 19:25, Patrick Stinson wrote:
>> > I have a pure C++ sip extension and it looks like sip-build is using
>> > the C
>> > compiler for everything. My other extension that sues pyqt-builder
>> > seems to
>> > work. Is there a way to get sip to use the c++ compiler for cpp files
>> > while
>> > also correctly compiling sip's C files like sip_array.c etc?
>> >
>> > Using sip-6.7.1.
>> >
>> > Cheers,
>> > -Patrick
>>
>> By default (ie. when you are not using PyQt-builder) SIP will use
>> setuptools to do the build. It will call the correct compiler depending
>> on the filename extension. Works fine for me.
>>
>> Phil
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20221008/232a5ab5/attachment.htm>


More information about the PyQt mailing list