chai2010 / webp

WebP decoder and encoder for Go (Zero Dependencies).
http://godoc.org/github.com/chai2010/webp
BSD 3-Clause "New" or "Revised" License
512 stars 89 forks source link

webp.h: No such file or directory #36

Closed Firstnsnd closed 3 years ago

Firstnsnd commented 3 years ago

github.com/chai2010/webp

./capi.go:26:10: fatal error: webp.h: No such file or directory

include "webp.h"

      ^~~~~~~~

compilation terminated.

faroyam commented 3 years ago

Hi, @vaniot-s! I've faced the same problem. Can you tell, how you solve it?

trentrand commented 2 years ago

Most likely your compiler is missing header files and shared objects. Try setting the LIBRARY_PATH and CPATH environment variables so that they include the missing file (e.g. webp.h).

For example, if you've installed webp using homebrew on MacOS 12, your configuration might look like:

export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/lib:/opt/homebrew/lib/
export CPATH=$CPATH:/usr/local/include:/opt/homebrew/include/