Integrating C Libraries Into Zig - What To Expect

  Рет қаралды 661

Joseph Montanez

Joseph Montanez

Күн бұрын

Are you a masochist? Then this might be the part of Zig you love the most!

Пікірлер: 5
@jakubvf
@jakubvf 23 күн бұрын
Thanks for sharing!
@chrboesch
@chrboesch 23 күн бұрын
Two things, firstly it is much easier to put the path information for C files into a build.zig (e.g. exe.addIncludePath(.{ .cwd_relative = "./lib/" }); , secondly there seems to be something wrong with your configuration, because in my Neovim I get auto-completion for the C import with ZLS. This is often necessary because you have to look at the definitions for the variables.
@joseph-montanez
@joseph-montanez 23 күн бұрын
ZLS will read into your build.zig which is why it works for you. When I start a project, I skip over build.zig altogether, because I need to figure out the flags / paths first and it just adds another layer I have to work through. I assume because you cannot read into relative outer paths with Zig for modules, maybe ZLS has the same issue. But yes, including the include path into your build.zig will negate what I brought up about the cImport and ZLS not working for auto complete.
Programming in C3 to Annoy Zig fans
1:51:55
Tsoding Daily
Рет қаралды 58 М.
Compiler Q&A, September 2024
2:10:03
Jonathan Blow
Рет қаралды 40 М.
When ur grandma sneaks u money
00:32
Adam W
Рет қаралды 19 МЛН
vampire being clumsy💀
00:26
Endless Love
Рет қаралды 31 МЛН
пришла на ДР без подарка // EVA mash
01:25
EVA mash
Рет қаралды 3,3 МЛН
Andrew Kelley   Practical Data Oriented Design (DoD)
46:40
ChimiChanga
Рет қаралды 174 М.
why do header files even exist?
10:53
Low Level
Рет қаралды 460 М.
Let's get rid of it - Compiling C without the C Runtime
15:15
Dani Crunch
Рет қаралды 42 М.
How all C/C++ build Systems Work (Except for CMake and Premake)
4:53
Kea Sigma Delta
Рет қаралды 13 М.
The case for sans-io
24:09
fasterthanlime
Рет қаралды 30 М.
Building a Better C with Loris Cro from Zig Software Foundation
1:10:26
Software Huddle
Рет қаралды 7 М.
Get Good at Zig with these resources for learning the language
14:24
Code With Cypert
Рет қаралды 7 М.
Gamedev in Zig is actually pretty good...
16:28
Coding with Sphere
Рет қаралды 30 М.
Interview Question | C Programming Language
0:57
Apna College
Рет қаралды 3,3 МЛН
When ur grandma sneaks u money
00:32
Adam W
Рет қаралды 19 МЛН