I came across this post by Eli Bendersky several months ago and have been meaning to play around with clang’s (ctypes-based) Python bindings. I’m interested in libclang because I think it could be the basis for a really slick wrapper generator for C++ code.
Turns out that obtaining a clang DLL to play around with on a Windows system is a little tricky. What finally worked for me was to configure my build tree as described in these instructions and then execute the following commands in a Visual Studio 2010 Command Prompt:
REM Use –G"Visual Studio 2010 Win64" instead to build a 64-bit DLL c:\tmp\llvm>cmake -G"Visual Studio 10" c:\projects\llvm c:\tmp\llvm>msbuild tools\clang\tools\libclang\libclang.vcxproj /m /p:Configuration=Release
This generated a file bin/Release/libclang.dll that I was able to use in conjunction with the examples in llvm/tools/clang/bindings/python/examples. Now I just need to figure out what to do with all the data… ![]()



