jessevdk / cldoc

clang based documentation generator for C and C++
GNU General Public License v2.0
553 stars 59 forks source link

Unable to locate libclang.dylib MacOSX Yosemite #88

Closed lzuwei closed 9 years ago

lzuwei commented 9 years ago

I am having some issues on MacOSX Yosemite, cldoc is complaining about libclang.dylib

it is located in /Library/Developer/CommandLineTools/usr/lib/libclang.dylib on my machine. Is there an easy way to point to this?

cldoc.clang.cindex.LibclangError: dlopen(libclang.dylib, 6): image not found. To provide a path to libclang use Config.set_library_path() or Config.set_library_file().

jessevdk commented 9 years ago

On OS X we look at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libclang.dylib. This works for me on Yosemite, but obviously you'll need Xcode installed. I'm on Yosemite and I don't have /Library/Developer/CommandLineTools/usr/lib/libclang.dylib.

For now this path is hard-coded at: https://github.com/jessevdk/cldoc/blob/master/cldoc/tree.py#L33. As a quick hack you can try modifying that and see if it resolves your issue. I'm not yet sure what the correct fix is for cldoc itself though.

jessevdk commented 9 years ago

Should be fixed in #87.