Hallo,
ich versuche unter Mac OS X ein in C geschriebenes Modul mit gcc zu kompilieren und suche dazu das Pendant zu "python25.lib".
Kann mir jemand einen Tipp geben?
Ciao
Matthias
c modul unter os x compilieren
Ich würde auch dringed zu distutils raten, hat bei mir neulich auch auf einem Apple problemlos hingehaut. Wenn du wirklich zu Fuss compilen willst, schau halt einmal im distutils-Quellcode nach, vielleicht findest du dort etwaige Eigenheiten für OS X.
Hab kurz drübergeschaut, dabei ist mir folgendes aufgefallen, allerdings hab ich hier nur Python 2.4, meine Information könnte also leicht angestaubt sein.schau halt einmal im distutils-Quellcode nach, vielleicht findest du dort etwaige Eigenheiten für OS X.
1.) Auf OSX gibt es eine Variable MACOSX_DEPLOYMENT_TARGET, die für's Übersetzen wichtig scheint:
Code: Alles auswählen
# (sysconfig.py)
# On MacOSX we need to check the setting of the environment variable
# MACOSX_DEPLOYMENT_TARGET: configure bases some choices on it so
# it needs to be compatible.
Code: Alles auswählen
# (unixcompiler.py)
# XXX Hackish, at the very least. See Python bug #445902:
# http://sourceforge.net/tracker/index.php
# ?func=detail&aid=445902&group_id=5470&atid=105470
# Linkers on different platforms need different options to
# specify that directories need to be added to the list of
# directories searched for dependencies when a dynamic library
# is sought. GCC has to be told to pass the -R option through
# to the linker, whereas other compilers just know this.
# Other compilers may need something slightly different. At
# this time, there's no way to determine this information from
# the configuration data stored in the Python installation, so
# we use this hack.
compiler = os.path.basename(sysconfig.get_config_var("CC"))
if sys.platform[:6] == "darwin":
# MacOSX's linker doesn't understand the -R flag at all
return "-L" + dir
-
- User
- Beiträge: 1790
- Registriert: Donnerstag 28. Oktober 2004, 16:33
- Wohnort: Graz, Steiermark - Österreich
- Kontaktdaten:
Dafür liegen dir genug andere Felsen im Weg. Bundles :-/ne0h hat geschrieben:gcc ist unter OS X standardmäßig vorinstalliert.
TUFKAB – the user formerly known as blackbird