Patches item #1479255, was opened at 2006-04-30 13:24 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1479255&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Distutils and setup.py Group: Python 2.4 Status: Open Resolution: None Priority: 5 Submitted By: dOb (d0b) Assigned to: Nobody/Anonymous (nobody) Summary: Fix building with SWIG's -c++ option set in setup.py Initial Comment: When the '--swig-opts -c++' command line option is used, the target extension is changed from .c to .cpp but when the '-c++' option is passed to an Extension with the swig_opts keyword argument, the target extension is not changed. This causes the compiler to treat the C++ source as C and fail. With the patch distutils uses the Extension's swig_opts argument in addition to the command line options to determine if the target extension should be .c or .cpp. Here are examples of what arguments get used with the executables in different situations: Without -c++ swig.exe -python -Iinclude -o interface/interface_wrap.c interface/interface.i cl.exe /c /nologo /Ox /MD /W3 /GX /DNDEBUG -Iinclude -IC:\Python24\include -IC:\Python24\PC /Tcinterface/interface_wrap.c /Fobuild\temp.win32-2.4\Release\interface/interface_wrap.obj With -c++ (as command line option) swig.exe -python -Iinclude -c++ -o interface/interface_wrap.cpp interface/interface.i cl.exe /c /nologo /Ox /MD /W3 /GX /DNDEBUG -Iinclude -IC:\Python24\include -IC:\Python24\PC /Tpinterface/interface_wrap.cpp /Fobuild\temp.win32-2.4\Release\interface/interface_wrap.obj With -c++ (in swig_opts in setup.py) swig.exe -python -Iinclude -c++ -o interface/interface_wrap.c interface/interface.i cl.exe /c /nologo /Ox /MD /W3 /GX /DNDEBUG -Iinclude -IC:\Python24\include -IC:\Python24\PC /Tcinterface/interface_wrap.c /Fobuild\temp.win32-2.4\Release\interface/interface_wrap.obj With -c++ (in swig_opts in setup.py with patch applied) swig.exe -python -Iinclude -c++ -o interface/interface_wrap.cpp interface/interface.i cl.exe /c /nologo /Ox /MD /W3 /GX /DNDEBUG -Iinclude -IC:\Python24\include -IC:\Python24\PC /Tpinterface/interface_wrap.cpp /Fobuild\temp.win32-2.4\Release\interface/interface_wrap.obj ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1479255&group_id=5470 _______________________________________________ Patches mailing list [email protected] http://mail.python.org/mailman/listinfo/patches
