#how add .lib file to my build ?

1 messages · Page 1 of 1 (latest)

worn epoch
#

i have .lib i want add to build

heavy nexus
#

LibExeObjStep have linkSystemLibrary2

worn epoch
#

huh ?

heavy nexus
#

exe.linkSystemLibrary

worn epoch
#
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" );
heavy nexus
#

because you provided a full path to dll. Libraries are linked with name only
use addLibraryPath

worn epoch
#

it is .dll i download from some where

#

it is not system thing

heavy nexus
#

that doesnt matter

worn epoch
#

exe.addLibraryPath(.{ .path = "./src/_lib/c_api/lib/taichi_c_api.lib" });

#

this ?

heavy nexus
#

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

worn epoch
#
exe.addLibraryPath(.{ .path = "./src/_lib/c_api/bin/taichi_c_api.dll" });
exe.linkSystemLibrary("taichi_c_api" );
#

this ?

heavy nexus
#

try it

#

no you put path to the dll

#

just path to bin

worn epoch
#
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 ?

heavy nexus
#

go for it

worn epoch
#
 error: error(link): DLL import library for -ltaichi_c_api not found
heavy nexus
#

you need .lib and .dll

#

both

#

in bin

worn epoch
#

i am really happy

#

it run after a day of try

#

i was using this and kept getting weird errors

heavy nexus
#

old zig stuff

#

build system changes