Hi all, My example compiler is working fine on Linux, including the extern'd functions (via -rdynamic flag on linker), but a friend on a MacOS (Darwin) cannot find the extern'd function. LLVM ERROR: Program used external function 'printVar' which could not be resolved! I've read some posts on the web indicating problems with the -rdynamic option on Mac's GCC, but I'm not sure. What's the Mac-style for that? cheers, --renato Reclaim your digital rights, eliminate DRM, learn more at http://www.defectivebydesign.org/what_is_drm
Renato Golin wrote:> I've read some posts on the web indicating problems with the -rdynamic > option on Mac's GCC, but I'm not sure. What's the Mac-style for that?-rdynamic doesn't exist on OSX, nor should it be needed. Just make sure that you do *not* strip the executable (i.e., avoid strip, install -s, etc.), IIRC that's needed to make dlopening the executable work on OSX (some versions at least). HTH, Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr.Graef at t-online.de, ag at muwiinfa.geschichte.uni-mainz.de WWW: http://www.musikinformatik.uni-mainz.de/ag
Hi- You /cannot/ build static binaries on Darwin apart from a few strange edge cases like the dynamic linker itself and kernel extensions - it's all implied to be dynamic. Where are the symbols you're trying to access coming from? Alastair On 31 Aug 2009, at 18:15, Renato Golin wrote:> Hi all, > > My example compiler is working fine on Linux, including the extern'd > functions (via -rdynamic flag on linker), but a friend on a MacOS > (Darwin) cannot find the extern'd function. > > LLVM ERROR: Program used external function 'printVar' which could not > be resolved! > > I've read some posts on the web indicating problems with the -rdynamic > option on Mac's GCC, but I'm not sure. What's the Mac-style for that? > > cheers, > --renato > > Reclaim your digital rights, eliminate DRM, learn more at > http://www.defectivebydesign.org/what_is_drm > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3912 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090831/2899d8e2/attachment.bin>
2009/8/31 Albert Graef <Dr.Graef at t-online.de>:> -rdynamic doesn't exist on OSX, nor should it be needed. Just make sure > that you do *not* strip the executable (i.e., avoid strip, install -s, > etc.), IIRC that's needed to make dlopening the executable work on OSX > (some versions at least).Ahn! That's it! In my "production" version of the Makefile make strip the final step on the binary. thanks! --renato Reclaim your digital rights, eliminate DRM, learn more at http://www.defectivebydesign.org/what_is_drm
Reasonably Related Threads
- [LLVMdev] rdynamic on Mac
- [LLVMdev] Having JIT resolve extern "C" functions declared in executible
- [LLVMdev] Unresolveable fallthrough functions
- [LLVMdev] Unresolveable fallthrough functions
- [LLVMdev] Having JIT resolve extern "C" functions declared in executible