Open linrio opened 4 years ago
$ make flif make: pkg-config: Command not found make: pkg-config: Command not found make: pkg-config: Command not found make: Warning: File 'Makefile' has modification time 134 s in the future g++ -c -std=gnu++11 -DLODEPNG_NO_COMPILE_PNG -DLODEPNG_NO_COMPILE_DISK -DNDEBUG -O2 -ftree-vectorize -flto -Wall -fPIC -o maniac/chance.o maniac/chance.cpp g++ -c -std=gnu++11 -DLODEPNG_NO_COMPILE_PNG -DLODEPNG_NO_COMPILE_DISK -DNDEBUG -O2 -ftree-vectorize -flto -Wall -fPIC -o maniac/symbol.o maniac/symbol.cpp g++ -c -std=gnu++11 -DLODEPNG_NO_COMPILE_PNG -DLODEPNG_NO_COMPILE_DISK -DNDEBUG -O2 -ftree-vectorize -flto -Wall -fPIC -o image/crc32k.o image/crc32k.cpp g++ -c -std=gnu++11 -DLODEPNG_NO_COMPILE_PNG -DLODEPNG_NO_COMPILE_DISK -DNDEBUG -O2 -ftree-vectorize -flto -Wall -fPIC -o image/image.o image/image.cpp g++ -c -std=gnu++11 -DLODEPNG_NO_COMPILE_PNG -DLODEPNG_NO_COMPILE_DISK -DNDEBUG -O2 -ftree-vectorize -flto -Wall -fPIC -o image/image-png.o image/image-png.cpp image/image-png.cpp:18:10: fatal error: png.h: No such file or directory #include <png.h> ^~~~~~~ compilation terminated. Makefile:41: recipe for target 'image/image-png.o' failed make: *** [image/image-png.o] Error 1
you should add -DFLIF_USE_STB_IMAGE in makefile :
-DFLIF_USE_STB_IMAGE
line2: CXXFLAGS := $(CXXFLAGS) $(shell pkg-config --cflags zlib libpng) -DLODEPNG_NO_COMPILE_PNG -DLODEPNG_NO_COMPILE_DISK -DFLIF_USE_STB_IMAGE
you should add
-DFLIF_USE_STB_IMAGE
in makefile :