You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const Builder = @import("std").build.Builder;
pub fn build(b: *Builder) void {
// Standard target options allows the person running `zig build` to choose
// what target to build for. Here we do not override the defaults, which
// means any target is allowed, and the default is native. Other options
// for restricting supported target set are available.
const target = b.standardTargetOptions(.{});
// Standard release options allow the person running `zig build` to select
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.
const mode = b.standardReleaseOptions();
const exe = b.addExecutable("claro-oss", "src/main.zig");
exe.addIncludeDir("C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.17763.0\\ucrt");
exe.addIncludeDir("C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.17763.0\\um");
exe.addIncludeDir("C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.17763.0\\shared");
exe.addIncludeDir("C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\include");
exe.addIncludeDir("C:\\Users\\omar\\github\\vcpkg\\installed\\x64-windows\\include");
exe.addLibPath("C:\\Users\\omar\\github\\vcpkg\\installed\\x64-windows\\lib");
exe.linkSystemLibrary("libssh");
exe.setTarget(target);
exe.setBuildMode(mode);
exe.install();
const run_cmd = exe.run();
run_cmd.step.dependOn(b.getInstallStep());
const run_step = b.step("run", "Run the app");
run_step.dependOn(&run_cmd.step);
}
And i'm facing the following error:
$ zig build run
C:\omarpta\d\zig\test-libssh\zig-cache\o\1yV0RcuP5JPtGCT660okV45ANMYA5yMQIWX-xAABD7zIB0nu5fsWfmbWjq3v3tzM\cimport.zig:7277:1: error: expected token ';', found 'pub'
pub const NtCurrentTeb = @compileError("unable to translate function"); // C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um\winnt.h:22421:1
^
test-libssh...The following command exited with error code 1:
C:\tools\zig\zig.exe build-exe C:\omarpta\d\zig\test-libssh\src\main.zig --library libssh --cache-dir C:\omarpta\d\zig\test-libssh\zig-cache --name test-libssh -I C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrt -I C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\um -I C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\shared -I C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include -I C:\Users\omar\github\vcpkg\installed\x64-windows\include -L C:\Users\omar\github\vcpkg\installed\x64-windows\lib --cache on
Build failed. The following command failed:
C:\omarpta\d\zig\test-libssh\zig-cache\o\Y9DY3LGEk0--pEOQN9ep1b_ilumvcgDzYcl68iSZHWAIcHxTDlI1t06RyUI5wfGh\build.exe C:\tools\zig\zig.exe C:\omarpta\d\zig\test-libssh C:\omarpta\d\zig\test-libssh\zig-cache run
When i open the zig-cache file which has the error i can see that zig "forgot" to put semicolon in this line:
Hi,
I'm trying to use libssh with zig on windows.
I installed the libssh using vcpkg with VS 2017 and here is my code:
build.zig
And i'm facing the following error:
When i open the zig-cache file which has the error i can see that zig "forgot" to put semicolon in this line:
Is it a bug from zig or am i doing something wrong?
Thanks in advance!
The text was updated successfully, but these errors were encountered: