Problems with -dyld_file ld option
Problems with -dyld_file ld option
- Subject: Problems with -dyld_file ld option
- From: David Hoerl <email@hidden>
- Date: Thu, 22 May 2008 09:10:53 -0400
Trying to link in some Matlab dylbs. They use internal load paths of
"../../bin/maci" which causes users fits (lots of posts on this).
After reading this article:
http://developer.apple.com/qa/qa2007/qa1567.html
it occurred to me that I might be able to use the same trick, so I
added a line to my "Other Linker Flags" of:
-dyld_file
/Applications/MATLAB74/bin/maci/libut.dylib:/Applications/MATLAB74/bin/maci/libut.dylib
But, ld barfs on it:
/Developer/usr/bin/gcc-4.0 -arch i386 -isysroot
/Developer/SDKs/MacOSX10.5.sdk ... -L/Applications/MATLAB74/bin/maci
... -dyld_file
/Applications/MATLAB74/bin/maci/libut.dylib:/Applications/MATLAB74/bin/maci/libut.dylib
-framework Foundation -lmx -lut -lmat ...
Error:
i686-apple-darwin9-gcc-4.0.1:
/Applications/MATLAB74/bin/maci/libut.dylib:/Applications/MATLAB74/bin/maci/libut.dylib:
No such file or directory
Just to prove to myself that I had gotten the path entered correctly,
I went to Terminal (and used copy/paste!):
]o[ ls -l /Applications/MATLAB74/bin/maci/libut.dylib
-rwxr-xr-x 1 dhoerl admin 691280 Jan 29 2007
/Applications/MATLAB74/bin/maci/libut.dylib
Any pointers appreciated.
David
PS:
a) interesting that google only finds only page when searching on dyld_file
b) I tried added "-lut" in front of -dyld_file with no change to error.
c) from the "ld(1) man page:
-dylib_file install_name:file_name
Specifies that a dynamic shared library is in a different location
than its standard location.
Use this option when you link with a library that is dependent on
a dynamic library, and the
dynamic library is in a location other than its default location.
install_name specifies the path
where the library normally resides. file_name specifies the path
of the library you want to use
instead. For example, if you link to a library that depends upon
the dynamic library libsys
and you have libsys installed in a nondefault location, you would
use this option:
-dylib_file /lib/libsys_s.A.dylib:/me/lib/libsys_s.A.dylib.
_______________________________________________
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