undefined: purego.Dlsym
Using this package I got this error: [email protected]\fitz_nocgo.go:666:25: undefined: purego.Dlsym
And what would be your usage? Naively cross-compile with CGO_ENABLED=0 for some architecture the purego library doesn't handle? That is experimental, as written in README, to cross-compile, use CGO_ENABLED=1 and the C compiler for that platform.
also seeing the same issue, using Windows 11 (intel chip)
Ok, same issue, but can one of you send the details so I don't have to guess?
@gen2brain The issue is in fitz_nocgo.go. This file contains purego.Dlsym(), which is only available on Unix systems, but this file does not contain a !windows build constraint.
Same issue, how to solve this problem
@hankin-h-k For a start, do not use experimental purego implementation.
我也遇见这个问题了, 求修复
Build Error: go build -o D:\project\go\taier\zhao_shang_server\cmd__debug_bin3435999559.exe -gcflags all=-N -l .\main.go github.com/gen2brain/go-fitz C:\Users\Administrator\go\pkg\mod\github.com\gen2brain\[email protected]\fitz_nocgo.go:666:25: undefined: purego.Dlsym (exit status 1)
Yes, it is experimental. When I find the time, I will fix it. But, maybe I will remove purego implementation, not sure why everyone is trying to use it. If I fix it next, there will be issues again about not handling crashes (it is not possible to use their fz_try/fz_catch) with the shared lib.
Fixed in https://github.com/gen2brain/go-fitz/commit/5c0c7131883fbd596a7295fc15fb55871814ccde.