• 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: Including C/C++ headers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Including C/C++ headers


  • Subject: Re: Including C/C++ headers
  • From: Andrew Wood <email@hidden>
  • Date: Thu, 7 May 2009 22:31:55 +0100

Thanks Jason Thats v helpful

Andrew
On 7 May 2009, at 14:59, Jason Foreman wrote:


Hi Andrew,

On May 7, 2009, at 7:04 AM, Andrew Wood wrote:

Ive been trying some more and discovered that even though the lib search path is set for the target & project, the dynamic linker is still looking elsewhere as the following screenshot shows:

http://www.simple.org/xcode.png


On 7 May 2009, at 11:18, Andrew Wood wrote:
On the command line I had to set the DYLD_LIBRARY_PATH variable and it seems the same problem is occuring in XCode. The correct folder is set in the targets library search path, and its listed in the Groups & Files list under Linked Frameworks but crashes at runtime with:

dyld_fatal_error

Im used to compiling from the command line on Linux but Im new to XCode.

The "Library Search Path" sets up the path used to find libs during the link phase of your target. It is not used at runtime.


One option would be to set the DYLD_LIBRARY_PATH for your executable. Select the executable in the Xcode groups and files tree and Get Info. There you can setup environment variables for your executable.

However, if you're building an app (which it looks like you might be from the screenshot), you'll probably want to put the lib into the app bundle and use install_name_tool to set the correct path for runtime loading. Search the list archives or google for "install_name_tool", "@loader_path", and "@rpath" to get an idea what you need to do.

Jason




______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email______________________________________________________________________ _______________________________________________
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

_______________________________________________ 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: 
 >Including C/C++ headers (From: Andrew Wood <email@hidden>)
 >Re: Including C/C++ headers (From: Jason Foreman <email@hidden>)
 >Re: Including C/C++ headers (From: Andrew Wood <email@hidden>)
 >Re: Including C/C++ headers (From: Andrew Wood <email@hidden>)
 >Re: Including C/C++ headers (From: Andrew Wood <email@hidden>)
 >Re: Including C/C++ headers (From: Jason Foreman <email@hidden>)

  • Prev by Date: Re: Xcode and SVN
  • Next by Date: do macs still have serial ports?
  • Previous by thread: Re: Including C/C++ headers
  • Next by thread: Re: Newbie needs help interpreting Xcode compiler errors and warnings
  • Index(es):
    • Date
    • Thread