-
usingnamespace
-
C optimization levels when using
build.zig
to build a C source file -
zig cc
without generating the pdb -
zig fetch --save
-
Linking with pre-built
dll
- Copy
dll
next toexe
const exe = b.addExecutable(.{...}); exe.addIncludePath(b.path("vendor/SDL3-3.1.6/include")); exe.addLibraryPath(b.path("vendor/SDL3-3.1.6_build")); exe.linkSystemLibrary("SDL3"); exe.linkLibC(); b.installArtifact(exe); b.installBinFile("vendor/SDL3-3.1.6_build/SDL3.dll", "SDL3.dll"); // copy the dll to the exe path
- Append
dll
dir to thePATH
const exe = b.addExecutable(.{...}); exe.addIncludePath(b.path("vendor/SDL3-3.1.6/include")); exe.addLibraryPath(b.path("vendor/SDL3-3.1.6_build")); exe.linkSystemLibrary("SDL3"); exe.linkLibC(); b.installArtifact(exe); const run_cmd = b.addRunArtifact(exe); run_cmd.step.dependOn(b.getInstallStep()); run_cmd.addPathDir("vendor/SDL3-3.1.6_build"); // `addPathDir` adds a to the `PATH` environment variable. // This is to avoid having to copy the dll to the exe path.
- Copy
-
Notifications
You must be signed in to change notification settings - Fork 0
doongjohn/learn-zig
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published