|
From: | Ben Abbott |
Subject: | Re: rpath versus dynlib on MacOS |
Date: | Sun, 13 Jan 2008 10:37:15 -0500 |
On Jan 13, 2008, at 10:05 AM, Thomas Weber wrote:
Hi, after revamping Octaviz' build system, I encountered (as in: someone told me) a problem with MacOS. Octaviz builds a shared library. In order for its .oct files to find this .so library, I add an rpath under Linux to the build flags.It seems MacOS' linker doesn't know rpath, but uses '-bundles' instead.Can someone give me a hint how to use this flag? In case someone wonders: I don't use mkoctfile, because I want to use precompiled headers. Somehow, the precise order of argurments seem to matter there, so I must control the order in wich I pass flags to the compiler (it's entirely possible that I'm just too stupid, but I couldn't get it to work with mkoctfile and it works using plain g++).
Thomas, are you asking how to use the "-bundles" flag?If so, I assume you know it is a linker option. I haven't tried to compile any oct-files yet. However, for Matlab, I created mex-files using a makefile. The link phase is
gfortran -funroll-loops -ftree-vectorize -O5 -Wl,-flat_namespace - undefined suppress -bundle -Wl,-exported_symbols_list,/Applications/ MATLAB_R2007b/extern/lib/maci/fexport.map -o my_mex_function.mexmaci my_object_code.o /Applications/MATLAB_R2007b/extern/lib/maci/ version4.o -L/Applications/MATLAB_R2007b/bin/maci -lmx -lmex -lmat -lm
I hope that is some help. Ben
[Prev in Thread] | Current Thread | [Next in Thread] |