Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Silly problem linking with dylibs and @loader_path



Jules Colding wrote:
> Hi,
> 
> I intent to ship a few custom libraries with my application. These I
> want to put into "MyApp.app/Contents/Libraries/". I also want to make
> the application relocatable.
> 
> So, I've added "-rpath @loader_path/../Libraries" to "Other Linker
> Flags" in the project options. I've also used "install_name_tool" to fix
> all of the loader paths in the extra libraries. The full "otool -L" list
> is in the end of this mail. Generally I've tried to follow the
> instructions here: "http://www.codeshorts.ca/tag/osx/";.
> 
> As a final step I told xcode to link to these libraries by adding them
> to the "Linked Frameworks" project folder. But gcc is complaining. The
> error is "@loader_path/../Libraries: no such file or directory".

-rpath takes a path, relative or absolute, so, I think '-rpath
../Libraries' is what you want.

Peter
-- 
Peter O'Gorman
http://pogma.com
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden

References: 
 >Silly problem linking with dylibs and @loader_path (From: Jules Colding <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.