Im trying to built my C/C++ project with zig. In the project I am using the boost libraries and have tried to add them to my build.zig (see code below) but I get a panic: unable to find artifact ‘boost’
Packages can expose modules and artifacts with a build.zig file.
Since boost does not expose any; only access to the archived files is available.
You can access the files using boost_dep.path
I would assume that I have to do something like exe.installHeader where I pass in the boost_dep.path however that takes an argument sub_path. I don’t know what that value should be in my case or what zig expects/does with it/needs it for.
So the way I understood it is if I in my c++ files have something like #include <boost/serialization/map.hpp> then I should pass in "/serialization/map.hpp" as sub_path.
However that wasn’t working for me (I get file not found error). Is the url (with the hash) enough or do I need to have it included in the project in a deps folder (or something similar)? And if so is there an other way of doing it because I’d rather not end up with a deps folder with the size of node_modules.
The url and hash is enough.
If you download the url and look inside the the .tar.gz archive then whatever you pass to sub_path should exist within there, I think the path should be specified without a leading /.