Useful Sticky Notes

Saturday, August 16, 2014

install_name_tool on Mac OS X

I'll repost this link to my Leap Motion development blog, but knowing the utility install_name_tool existed many months ago would have saved me much grief trying to figure out why I could never link a standard C++ app to their supplied dylib SDK library except through Xcode.

I knew they had a library path "@loader_path/libLeap.dylib" which confused the linker, but I had no clue then how to change it (surprisingly, googling the error failed to give any mention to install_name_tool.) Understanding very little of Mac OS X-specific development issues, I made the assumption that dylib libraries worked their own special ways (as MACH-O binaries, they actually somewhat do), and that Xcode would know how to deal with that weird path.

Well, now I know. And kudos to the Leap Devs for releasing examples in plain C++ (and a Makefile) which helped me lots!

No comments:

Post a Comment