<div dir="ltr">Ah roger that. I was stepping through the sipbuild's calls in setuptools but assumed it wouldn't pull in env vars. <div><br></div><div>Luckily the lib source I am compiling in my extension is simple enough that I could just replace the c++11/c++14 stuff with older counterparts so I am all good. But interesting to know that clang defaults to an old spec and that it can prevent extensions to build unless using some c++ specific flags var like CPPFLAGS.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Oct 8, 2022 at 6:09 AM Phil Thompson <<a href="mailto:phil@riverbankcomputing.com">phil@riverbankcomputing.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">According to the setuptools docs setting the CPPFLAGS environment <br>
variable might work.<br>
<br>
Phil<br>
<br>
On 08/10/2022 14:49, Patrick Stinson wrote:<br>
> So then with:<br>
> <br>
> extra-compile-args = ["-std=c++11"]<br>
> <br>
> you get this for the .c files:<br>
> <br>
> error: invalid argument '-std=c++11' not allowed with 'C'<br>
> <br>
> On Sat, Oct 8, 2022 at 5:47 AM Patrick Stinson <<a href="mailto:patrickkidd@gmail.com" target="_blank">patrickkidd@gmail.com</a>><br>
> wrote:<br>
> <br>
>> Yeah, ok. It compiles fine on ubuntu. I think this is actually a <br>
>> problem<br>
>> in the default c++ spec for clang 14.0.0 on macos 12.6, for example <br>
>> these<br>
>> warnings and errors:<br>
>> <br>
>> warning: scoped enumerations are a C++11 extension <br>
>> [-Wc++11-extensions]<br>
>> error: unknown type name 'constexpr'<br>
>> <br>
>> On Fri, Oct 7, 2022 at 12:25 AM Phil Thompson <br>
>> <<a href="mailto:phil@riverbankcomputing.com" target="_blank">phil@riverbankcomputing.com</a>><br>
>> wrote:<br>
>> <br>
>>> On 06/10/2022 19:25, Patrick Stinson wrote:<br>
>>> > I have a pure C++ sip extension and it looks like sip-build is using<br>
>>> > the C<br>
>>> > compiler for everything. My other extension that sues pyqt-builder<br>
>>> > seems to<br>
>>> > work. Is there a way to get sip to use the c++ compiler for cpp files<br>
>>> > while<br>
>>> > also correctly compiling sip's C files like sip_array.c etc?<br>
>>> ><br>
>>> > Using sip-6.7.1.<br>
>>> ><br>
>>> > Cheers,<br>
>>> > -Patrick<br>
>>> <br>
>>> By default (ie. when you are not using PyQt-builder) SIP will use<br>
>>> setuptools to do the build. It will call the correct compiler <br>
>>> depending<br>
>>> on the filename extension. Works fine for me.<br>
>>> <br>
>>> Phil<br>
>>> <br>
>> <br>
</blockquote></div>