-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
Compiling and linking main() with C++ compiler #42471
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
Comments
The attached patch proposes a resolution to the discussion The patch contains the following changes:
|
Logged In: YES One question: is step 4 a wise idea? Picking a random C++ compiler if OTOH, actually doing the configure magic to determine that the selected Maybe try only standard combinations cc/c++ gcc/g++ and otherwise |
Logged In: YES I am going to upload a revision of my patch that addresses The change is in lin with jackjansen's second suggestion. It is |
Logged In: YES Well, as I commented on this patch and you quickly followed my suggestions I I built a C++ extension on MacOSX 10.4, gcc 4, framework Python. The good Additionally, the Makefile has Maybe someone who has a machine with both cc/c++ and gcc/g++ installed, |
Logged In: YES distutils behaves the same way in Python 2.4.1, as I I am surprised that, on your machine, CC=gcc and CXX=c++. I |
Logged In: YES My second patch was indeed broken since it referred to $CC I am going to upload a third version (cxx-main.patch3) that To repeat what I wrote in my last comment: This patch does |
Logged In: YES I can confirm cxx-main.patch3 fixes build problems with gcc |
Logged In: YES Forgot to mention the python version: I used it for both
|
Logged In: YES Thanks for the patch, committed as 45387. I modified it |
Remove the "configure --with-cxx-main" build option: it didn't work for many years. Remove the MAINCC variable from configure and Makefile. The MAINCC variable was added by the issue gh-42471: commit 0f48d98. Previously, --with-cxx-main was named --with-cxx. Keep CXX and LDCXXSHARED variables, even if they are no longer used by Python build system.
Remove the "configure --with-cxx-main" build option: it didn't work for many years. Remove the MAINCC variable from configure and Makefile. The MAINCC variable was added by the issue pythongh-42471: commit 0f48d98. Previously, --with-cxx-main was named --with-cxx. Keep CXX and LDCXXSHARED variables, even if they are no longer used by Python build system.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: