About DYLIB search path
Thales Luis Rodrigues Sabino <[email protected]> Mon, 30 Apr 2012 14:49:17 -0300
| Newsgroups | gmane.comp.lang.lua.bind.user |
|---|---|
| Message-ID | <CAHvrNafT6r63ReO=CXcW3LzA-+YNA5VaxbhcM27mLxAYvh+pCQ@mail.gmail.com> |
I was able to build and use luabind within my applications without problems but I have one question. In order to test LuaBind I created a command line tool using XCode 4.2. I add libluabind.dylib in the "link binaries with" area and add a copy phase in order to copy the dylib to the same directory where the executable resides. Using otool to grab information about the executable dependencies I get the following *LuaBindExample:* * bin/darwin/release/libluabind.dylib (compatibility version 0.0.0, current version 0.0.0)* * /opt/local/lib/liblua.dylib (compatibility version 5.1.0, current version 5.1.4)* * /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)* * /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)* My question is why the dylib path for luabind starts with bin/? I copy the dylib file in the executable directory but if I run the program it gives the following error *dyld: Library not loaded: bin/darwin/release/libluabind.dylib* * Referenced from: /Users/tluisrs/Library/Developer/Xcode/DerivedData/LuaBindExamples-fnnpnobfkchkzdemmonixfvtemzl/Build/Products/Debug/./LuaBindExample * * Reason: image not found* *Trace/BPT trap* Which I can understand. I was able to solve this problem exporting the dylib path in the environment variable DYLD_LIBRARY_PATH. But I was trying to create a stand alone "bundle" in order to distribute my application without having to configure the environment every single time. To build luabind I use bjam. I did not find any information about how to change the search path for a dylib within an executable. Does anyone have a clue? Thanks. -- Anyday, anytime. http://www.capimlokura.com.br Thales Luis Rodrigues Sabino TLuisRS ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ luabind-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/luabind-user