Skip to content

mindon/hello-zig-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hello-zig-cpp

A demo how to call c++ from Zig

based on https://github.com/anagram3k/zig-with-cpp

  1. using a c++ lib, a binding.cpp and binding.h should be appended to build the lib;
  2. binding.h should be installed
  3. use
const c = @cImport({
    @cInclude("xlib/binding.h"); // the binding.h installed path
});

in zig, and call binding things with c.*

zig build run

About

A demo how to call c++ from Zig

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages