Opened 14 years ago

Last modified 14 years ago

#3515 new defect

Python Mapscript has to be linked with C++

Reported by: marisn Owned by: hobu
Priority: normal Milestone:
Component: MapScript-Python Version: unspecified
Severity: normal Keywords:
Cc:

Description

Current Python Mapscript sucessfull build and linkage depends on undocumented GCC feature/bug, as Python's distutils are not designed to be used with C++ applications: http://bugs.python.org/issue1222585

As Python Mapscript depends on C++ libraries (i.e. GEOS), it needs to be linked by C++ and not C linker (or whatever it's called).

Workaround: add following code in upper part of setup.py to temporary force linker to use C++ one instead of C.

save_init_posix = sysconfig._init_posix
def ms_init_posix():
    save_init_posix()
    if 'LDCXXSHARED' in sysconfig._config_vars:
        sysconfig._config_vars['LDSHARED'] = sysconfig._config_vars['LDCXXSHARED']
sysconfig._init_posix = ms_init_posix

Change History (1)

comment:1 by hobu, 14 years ago

Applied in trunk in r10457. Please confirm, and I'll backport to the stable branch.

Note: See TracTickets for help on using tickets.