Closed JensvandeWiel closed 1 year ago
it is inported and added to go.mod
This looks like a basic Go question, I cannot reproduce your problem, sorry.
i've tried everything but i can not get it to work. ill try to reproduce it on another machine
its something in the enviroment
dont know what yet
I'm having same issue go mod
go 1.20
require (
github.com/gen2brain/go-fitz v1.20.2
)
I'm receiving compile time errors
internal/dataMatrixParser/services.go:16:58: undefined: fitz.Document
Code snippet
package XXX
import (
"bytes"
"github.com/gen2brain/go-fitz"
"github.com/XXX/XXXXX/internal/model"
"image"
)
type MatrixParser interface {
ParsePdf(parsingRequest model.ParsingRequest, doc *fitz.Document) (*bytes.Buffer, error)
}
}
When I was using version v0.0.0-20201207194431-072519bd9a7e
I had no problems
我也遇到同意的问题 请问你解决了吗
I guess you all are using Windows. The most simple way to install the GCC compiler for me on Windows was to use TDM-GCC. There is also mingw64, you need to install the compiler for the arch you are going to use. I guess if anyone just enabled verbose build everything should be clear. Anyway, this is not the right place for such questions.
Error undefined: fitz.NewFromMemory : Fitz in cross compiling Linux under Windows 10
@dyhgoa When you cross-compile, Go will set CGO_ENABLED to 0, when you set it to 1, you will see the real error message, i.e. you want to compile for Linux with C compiler for Windows, etc. Of course, you cannot just change GOOS and expect it to work.
Does not matter what i use: NewFromReader, NewFromMemory or New it throws the same error