Closed bwmarrin closed 1 year ago
Of course - after asking a question I think I've come up with a solution. The below command will tell Go where to look for these files.
CGO_CFLAGS=-I/usr/local/include CGO_LDFLAGS=-L/usr/local/lib go build
This can also be done by adding the below two lines to the top of both the decoder.go and encoder.go files near the rest of the cgo build lines.
#cgo freebsd CFLAGS: -I/usr/local/include
#cgo freebsd LDFLAGS: -L/usr/local/lib
Any change you (or someone) has any tips or steps on how to build this library on FreeBSD? I'm not that keen on working with cgo :(
I've installed the webp package and that includes the header files in /usr/local/include/webp and libs in /usr/local/lib/libwebp*
When I try to build the example encode I get the below errors. I'm not sure how to tell it to look in the /usr/local/include/webp folder for the encode.h and decode.h files.