joaomoreno / gifcap

Capture your screen to a GIF in your browser
https://gifcap.dev
GNU General Public License v3.0
1.33k stars 95 forks source link

the error of configure encoder.c #62

Closed anquanbiji closed 2 years ago

anquanbiji commented 2 years ago

Hi there is no encoder.js and encoder.wasm in the source code , so i hope to configure the encoder.c this is the error when do the MAKE, anyone can give me some advice? thanks.

emcc -O2 -s ALLOW_MEMORY_GROWTH=1 -s RESERVED_FUNCTION_POINTERS=20 -s ALLOW_TABLE_GROWTH=1 -s EXPORTED_FUNCTIONS=['_malloc','_free'] -Ivendor/l ibimagequant -Ivendor/gifsicle/src -Ivendor/gifsicle/include -o encoder.js encoder.c vendor/libimagequant/blur.o vendor/libimagequant/kmeans.o vendor/libimagequant/libimagequant.o vendor/libimagequant/mediancut.o vendor/libimagequant/mempool.o vendor/libimagequant/nearest.o vendor/libi magequant/pam.o vendor/gifsicle/src/giffunc.o vendor/gifsicle/src/fmalloc.o vendor/gifsicle/src/support.o vendor/gifsicle/src/gifwrite.o vendor /gifsicle/src/gifread.o
encoder.c:96:24: error: implicit declaration of function 'Gif_NewMemoryWriter' is invalid in C99 [-Werror,-Wimplicit-function-declaration] Gif_Writer *writer = Gif_NewMemoryWriter(&gif_write_info);

joaomoreno commented 2 years ago

encoder.js and wasm are here: https://github.com/joaomoreno/gifcap/tree/gh-pages/encoder

For building... you can use the provided Dockerfile, just like it's used in CI: https://github.com/joaomoreno/gifcap/blob/main/.github/actions/build/action.yml

anquanbiji commented 2 years ago

Thanks

when I try to build by myself with Dockfile , there is a error "bash: line 0: cd: encoder: No such file or directory".

my command is ` cd encoder

docker build -t encoder

docker run encoder `