Thus the question: How to I set the runtime path for the linker under Mac OSX?ītw, setting DYLD_LIBRARY_PATH works - but I don't want to use this hack.Įdit: Regarding otool -L: $ otool -L a.out $ gcc main.c -lblah -L`pwd` -Xlinker -rpath -Xlinker `pwd`/t $ gcc -dynamiclib blah.o -o libblah.dylib I tried to get it working with a minimal example - without success: $ cat blah.c I found some information that Mac OS X gcc has -rpath support since 10.5, i.e. Under Linux this is possible with -Xlinker -rpath -Xlinker /path/to (or using -Wl,-rpath,/path/to) and under Solaris you can add -R/path/to to the compiler command line. I want to set under Mac OSX the runtime path of an executable (for the linker) at compile time, such that shared libraries at non-standard locations are found by the dynamic linker at program start.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |