A demo how to call c++ from Zig
based on https://github.com/anagram3k/zig-with-cpp
- using a c++ lib, a binding.cpp and binding.h should be appended to build the lib;
- binding.h should be installed
- use
const c = @cImport({
@cInclude("xlib/binding.h"); // the binding.h installed path
});
in zig, and call binding things with c.*
zig build run