-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to build extension with mixed C and C++ sources #27
Comments
This sounds like a feature request rather than a bug. It appears to me you're attempting to build an extension that includes both C++ and C sources, but in the parameters to the extension, you're specifying C++ to the compiler. I'm not surprised the compiler complains. I think you're after a feature that does not yet exist. I agree, the patch provided isn't particularly robust. I suspect what you're after is a more sophisticated extension-building mechanism that understands how to build and link from different source languages. I welcome your or others to work on a solution. |
Not sure if it's going to be helpful but Gentoo has historically carried a large distutils patch with some parts related to C++ compiling. Unfortunately, it was undocumented and nobody really cared to figure out why exactly it was needed. It can be grabbed e.g. from https://gitweb.gentoo.org/fork/cpython.git/commit/?h=gentoo-3.10.0_p1&id=11d9404f6bd865155fbc861b483f2d99afcd74e4 |
@jaraco, seems like this bug was closed by accident. |
Gah. What a mess. Thanks for letting me know. |
The code above won't compile on macOS.
clang
complains that-std=c++
could not be used for C source code (i.e.b.c
).There is a quick fix for my issue on this line:
distutils/distutils/ccompiler.py
Line 571 in 35e1c9d
However, this is a not decent solution to the cause of the issue.
The text was updated successfully, but these errors were encountered: