Silly problem linking with dylibs and @loader_path
Silly problem linking with dylibs and @loader_path
- Subject: Silly problem linking with dylibs and @loader_path
- From: Jules Colding <email@hidden>
- Date: Fri, 27 Jun 2008 15:31:01 +0200
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".
How do I fix this?
Thanks a lot,
jules
###################### "otool -L" output #######################
colding@apollo ~/work/src/42tools/rubicon/sync_client/
additional_libraries $ ls -l
total 5760
-rwxr-xr-x 1 colding staff 482852 27 Jun 14:35 libORBit-2.0.dylib
-rwxr-xr-x 1 colding staff 1007664 27 Jun 14:37 libglib-2.0.0.dylib
-rwxr-xr-x 1 colding staff 18740 27 Jun 14:38
libgmodule-2.0.0.dylib
-rwxr-xr-x 1 colding staff 294492 27 Jun 14:39
libgobject-2.0.0.dylib
-rwxr-xr-x 1 colding staff 24572 27 Jun 14:40
libgthread-2.0.0.dylib
-rwxr-xr-x 1 colding staff 1061556 27 Jun 14:29 libiconv.2.dylib
-rwxr-xr-x 1 colding staff 47860 27 Jun 14:41 libintl.8.dylib
colding@apollo ~/work/src/42tools/rubicon/sync_client/
additional_libraries $ otool -L ./*
./libORBit-2.0.dylib:
@rpath/libORBit-2.0.dylib (compatibility version 2.0.0, current
version 2.0.0)
@rpath/libgmodule-2.0.0.dylib (compatibility version 1601.0.0,
current version 1601.3.0)
@rpath/libgobject-2.0.0.dylib (compatibility version 1601.0.0,
current version 1601.3.0)
@rpath/libgthread-2.0.0.dylib (compatibility version 1601.0.0,
current version 1601.3.0)
@rpath/libglib-2.0.0.dylib (compatibility version 1601.0.0, current
version 1601.3.0)
@rpath/libintl.8.dylib (compatibility version 9.0.0, current version
9.2.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 111.1.1)
@rpath/libiconv.2.dylib (compatibility version 7.0.0, current version
7.0.0)
/usr/lib/libresolv.9.dylib (compatibility version 1.0.0, current
version 25.0.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
version 1.0.0)
./libglib-2.0.0.dylib:
@rpath/libglib-2.0.0.dylib (compatibility version 1601.0.0, current
version 1601.3.0)
@rpath/libiconv.2.dylib (compatibility version 7.0.0, current version
7.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 111.0.0)
@rpath/libintl.8.dylib (compatibility version 9.0.0, current version
9.2.0)
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
(compatibility version 2.0.0, current version 136.0.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
version 1.0.0)
./libgmodule-2.0.0.dylib:
@rpath/libgmodule-2.0.0.dylib (compatibility version 1601.0.0,
current version 1601.3.0)
@rpath/libglib-2.0.0.dylib (compatibility version 1601.0.0, current
version 1601.3.0)
@rpath/libiconv.2.dylib (compatibility version 7.0.0, current version
7.0.0)
@rpath/libintl.8.dylib (compatibility version 9.0.0, current version
9.2.0)
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
(compatibility version 2.0.0, current version 136.0.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 111.0.0)
./libgobject-2.0.0.dylib:
@rpath/libgobject-2.0.0.dylib (compatibility version 1601.0.0,
current version 1601.3.0)
@rpath/libglib-2.0.0.dylib (compatibility version 1601.0.0, current
version 1601.3.0)
@rpath/libiconv.2.dylib (compatibility version 7.0.0, current version
7.0.0)
@rpath/libintl.8.dylib (compatibility version 9.0.0, current version
9.2.0)
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
(compatibility version 2.0.0, current version 136.0.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 111.0.0)
./libgthread-2.0.0.dylib:
@rpath/libgthread-2.0.0.dylib (compatibility version 1601.0.0,
current version 1601.3.0)
@rpath/libglib-2.0.0.dylib (compatibility version 1601.0.0, current
version 1601.3.0)
@rpath/libiconv.2.dylib (compatibility version 7.0.0, current version
7.0.0)
@rpath/libintl.8.dylib (compatibility version 9.0.0, current version
9.2.0)
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
(compatibility version 2.0.0, current version 136.0.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 111.0.0)
./libiconv.2.dylib:
@rpath/libiconv.2.dylib (compatibility version 7.0.0, current version
7.0.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 111.0.0)
./libintl.8.dylib:
@rpath/libintl.8.dylib (compatibility version 9.0.0, current version
9.2.0)
@rpath/libiconv.2.dylib (compatibility version 7.0.0, current version
7.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 111.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/
CoreFoundation (compatibility version 150.0.0, current version 476.0.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
version 1.0.0)
_______________________________________________
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