gen2brain / go-fitz

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

using this package as a dependency doesn't bring in the include files #61

Closed cmagorian closed 1 year ago

cmagorian commented 1 year ago

I receive this when attempting to build with this package. This was after switching to go 1.18. I have CGO_ENABLED=1, which is required to make arm64 work (M1)

# github.com/gen2brain/go-fitz
vendor/github.com/gen2brain/go-fitz/fitz.go:6:10: fatal error: 'mupdf/fitz.h' file not found
#include <mupdf/fitz.h>
         ^~~~~~~~~~~~~~
1 error generated.
make: *** [build] Error 2
gen2brain commented 1 year ago

Do not use vendoring, it will only copy *.go files. There are many similar issues, now closed.

gen2brain commented 1 year ago

Btw. it is not at all related to arm64, this package use CGO so that is needed on whatever architecture.