Re: Linking in a framework using the command line
Re: Linking in a framework using the command line
- Subject: Re: Linking in a framework using the command line
- From: Frederick Cheung <email@hidden>
- Date: Wed, 1 Jun 2005 17:50:13 +0100
On 1 Jun 2005, at 15:34, Cem Karan wrote:
I'm using gcc 4.0 from the command line to try to link together a
very simple Python extension I'm writing. I've been trying to use
the following command:
gcc -F/Library/Frameworks/Python.framework/ foo.c -o fooMod
but I keep on getting linking errors:
/usr/bin/ld: Undefined symbols:
_PyErr_NewException
_PyModule_AddObject
_PyRun_SimpleString
_PySys_SetArgv
_Py_Exit
_Py_InitModule4
_Py_Initialize
_Py_SetProgramName
collect2: ld returned 1 exit status
Any ideas what other commands I'm supposed to lay down to get the
framework to link in?
And before anyone asks, I compiled and installed Python 2.4 on my
own, so there actually is a framework called Python.framework
there. I also tried to follow the gcc instructions and call -F
with "/Library/Frameworks/Python", but that always fails with "/usr/
bin/ld: warning -F: directory name (/Library/Frameworks/Python)
does not exist".
You need to pass -framework Foo to use that framework. -F is for
telling gcc where to look for frameworks, (and I believe you don't
need it here since IIRC /System/Library/Frameworks and /Library/
Frameworks are searched by default).
Fred
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden