gen2brain / go-fitz

Golang wrapper for the MuPDF Fitz library
GNU Affero General Public License v3.0
369 stars 87 forks source link

Error: ./PDFToImg.go:21:19: undefined: fitz.New #76

Closed JensvandeWiel closed 1 year ago

JensvandeWiel commented 1 year ago

https://github.com/gen2brain/go-fitz/issues/74

still get Error: ./PDFToImg.go:21:19: undefined: fitz.New

now i'm trying it in a github workflow and still get the error when trying to build for windows.

https://github.com/JensvandeWiel/schoolantwoorden-cli/actions/runs/4637349791/jobs/8206156685

code: https://github.com/JensvandeWiel/schoolantwoorden-cli/blob/master/PDFToImg.go

ivanmartos commented 1 year ago

I'm facing same issues https://github.com/gen2brain/go-fitz/issues/74#issuecomment-1509872340

DerRueter commented 1 year ago

I had the same problems, try installing the c and c++ compilers. At least that worked for me. I've analysed it via sysinternals with procmon and saw that go.exe was looking for gcc.

Guide: https://www.freecodecamp.org/news/how-to-install-c-and-cpp-compiler-on-windows/

gen2brain commented 1 year ago

Sorry, I don't have time to work on the user issues. The basic CGO setup is what is needed here, and this is not the place to ask for help for that. If there is actually something wrong with the go-fitz repo fill free to reopen the issue, thanks.