LINKFORSHARED problem on Mac OS 10.4

  • Thread starter Andrew Trevorrow
  • Start date
A

Andrew Trevorrow

[I sent this to pythonmac-sig but never got a reply, so hopefully there are
more Mac Python gurus here.]

I recently added Python scripting to our app (an open source, cross-platform
Life app called Golly; see http://golly.sourceforge.net/ if you're interested).

Based on what I read at http://pythonmac.org/wiki/FAQ, our makefile uses
these variables when compiling and linking:

PYTHON_INCLUDE = -I`python -c "import distutils.sysconfig; print
distutils.sysconfig.get_python_inc()"`
PYTHON_LINK = `python -c "import distutils.sysconfig; print
distutils.sysconfig.get_config_var('LINKFORSHARED')"`

This works fine on OS 10.3.9, but on an Intel Mac running OS 10.4.5 the link
step fails because PYTHON_LINK is set to this:

-u __dummy -u _PyMac_Error -framework System
Python.framework/Versions/2.3/Python -framework CoreServices -framework
Foundation

Does anybody know why it contains "Python.framework/Versions/2.3/Python" rather
than "-framework Python"?

I can fix the problem by explicitly using

PYTHON_LINK = -u __dummy -u _PyMac_Error -framework System -framework
Python -framework CoreServices -framework Foundation

but presumably that's not a good long-term solution.

This is my first project using gcc, makefiles, frameworks, Python, etc,
so I'm still somewhat foggy about lots of things. Any advice would be
much appreciated!

Andrew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top