Hello,
I am trying to include a function from C code into a zig program. That function relies on curl, which I have installed in my system. My question is, how do I make build.zig aware of it’s location as I would do using gcc.
Thank you very much in advance
this should work, but it might not depending on where curl is located
exe_or_lib.linkSystemLibrary("curl");
2 Likes
- To get something similar to
-I
usestd.Build.Step.Compile.addIncludePath
- To get something similar to
-L
usestd.Build.Step.Compile.addLibraryPath
- what @vulpex said should do something similar
pkg-config --cflags --libs curl
2 Likes