-
Notifications
You must be signed in to change notification settings - Fork 42
Description
I'm trying to use the daulet/tokenizers library in a Go program via cgo, but I'm encountering an issue when running the program — I get errors saying that functions like from_file, encode, etc. are undefined ("undefined reference").
What I did:
-
Cloned the tokenizers repository.
-
Ran make build, which successfully generated the static library libtokenizers.a.
-
Wrote a minimal Go program that calls functions from the library.
-
Tried to run the program with the following command:
go run -ldflags="-extldflags '-L./'" .
The libtokenizers.a file is located in the current directory.
The problem:
During the build process, I get linker errors indicating that functions such as from_file, encode, etc. cannot be found.
I'd really appreciate any help or advice on how to correctly link this library with a Go program.
Thanks in advance!

