rossy / img2xterm

Displays images on your 256-color terminal with Unicode block characters.
http://img2xterm.sooaweso.me
Creative Commons Zero v1.0 Universal
173 stars 14 forks source link

Support newer versions of imagemagick #13

Open XenGi opened 6 years ago

XenGi commented 6 years ago

Compilation fails with imagemagick 7.

gcc -O2 -Wall -D_GNU_SOURCE -D_DEFAULT_SOURCE -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/ImageMagick-7 -D_FORTIFY_SOURCE=2  -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/ImageMagick-7 -o img2xterm img2xterm.c -s -lMagickWand-7.Q16HDRI -lMagickCore-7.Q16HDRI -lm -lncursesw -lMagickWand-7.Q16HDRI -lMagickCore-7.Q16HDRI
img2xterm.c:12:0: warning: "_GNU_SOURCE" redefined
 #define _GNU_SOURCE

<command-line>:0:0: note: this is the location of the previous definition
img2xterm.c:18:10: fatal error: wand/MagickWand.h: No such file or directory
 #include <wand/MagickWand.h>
          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:46: img2xterm] Error 1
==> ERROR: A failure occurred in build().
    Aborting...
0xspade commented 6 years ago

following :smile:

0xspade commented 6 years ago

still cant run this thing even i change the #include <wand/MagickWand.h> to #include <MagickWand/MagickWand.h>

XenGi commented 6 years ago

That worked for me: https://github.com/rossy/img2xterm/pull/14

Foro38 commented 3 years ago

If you're on fedora, try installing ImageMagick-devel, that worked for me