#how add .lib file to my build ?
1 messages · Page 1 of 1 (latest)
LibExeObjStep have linkSystemLibrary2
huh ?
exe.linkSystemLibrary
zig build-exe zigvlkantest Debug native: error: error: failed to check zig installation for DLL import libs: Unexpected
give this error
exe.linkSystemLibrary("C:/Users/Admin/Desktop/zigvlkantest/src/_lib/bin/taichi_c_api.dll" );
because you provided a full path to dll. Libraries are linked with name only
use addLibraryPath
that doesnt matter
no
library is for cinclude
systemlibrary is for linking
oh wait
my bad i was confused
yes addLibraryPath but give it path to the folder
then in linkSystemlibrary just name no extension
exe.addLibraryPath(.{ .path = "./src/_lib/c_api/bin/taichi_c_api.dll" });
exe.linkSystemLibrary("taichi_c_api" );
this ?
zig build-exe zigvlkantest Debug native: error: error: failed to check zig installation for DLL import libs: Unexpected
wait
exe.addLibraryPath(.{ .path = "./src/_lib/c_api/bin" });
exe.linkSystemLibrary("taichi_c_api" );
this ?
go for it
error: error(link): DLL import library for -ltaichi_c_api not found

i am really happy
it run after a day of try
i was using this and kept getting weird errors
but that worked

tnx