• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Linking in a framework using the command line
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linking in a framework using the command line


  • Subject: Re: Linking in a framework using the command line
  • From: Cem Karan <email@hidden>
  • Date: Wed, 1 Jun 2005 12:58:30 -0400

You're right, that did it.  Thanks!

Thanks,
Cem Karan

On Jun 1, 2005, at 12:50 PM, Frederick Cheung wrote:


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
References: 
 >Linking in a framework using the command line (From: Cem Karan <email@hidden>)
 >Re: Linking in a framework using the command line (From: Frederick Cheung <email@hidden>)

  • Prev by Date: Re: Linking in a framework using the command line
  • Next by Date: Re: Very very slow debugger
  • Previous by thread: Re: Linking in a framework using the command line
  • Next by thread: Re: Linking in a framework using the command line
  • Index(es):
    • Date
    • Thread