Skip to content
dlang code generator using libclang
D C++ CMake
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
cpp
source
submodules
.gitignore
.gitmodules
README.md
d.natvis
dub.json
dub.selections.json
sample.h

README.md

Dlang CLANg GENerator

Parse c++ source by libclang.cindex, and generate Dlang Source.

ToDo

  • function pointer type
  • multi source entry point
  • union
  • anonymous union
  • anonymous struct
  • D3D11CreateDevice
  • interface method
  • interface reduce asterisk
  • use core.sys.windows.windows
  • com interface uuid
  • com interface inheritance
  • macro definition value

Usage

$ dclangen.exe -I "C:/Program Files/LLVM/include" --outdir source/libclang -H "C:/Program Files/LLVM/include/clang-c/Index.h" -H "C:/Program Files/LLVM/include/clang-c/CXString.h"
  • --outdir Output Directory: remove if exists, then write exported files
  • -I Include Directory: clang argument
  • -H Process Header: file that contains functions and macro definitions

generate d sources to source/libclang

generate d3d

$ dclangen.exe --outdir source/d3d11 -H "C:/Program Files (x86)/Windows Kits/10/Include/10.0.17763.0/um/d3d11.h -H "C:/Program Files (x86)/Windows Kits/10/Include/10.0.17763.0/shared/dxgi.h"

clang command line

You can’t perform that action at this time.