installed imageMagick using brew install ImageMagick
error log:
g++ -c sample.cc -lm -O3 -Wall -Wno-unused-result `Magick++-config --cppflags --cxxflags --ldflags --libs`
clang: warning: -lm: 'linker' input unused
clang: warning: -lMagick++-7.Q16HDRI: 'linker' input unused
clang: warning: -lMagickWand-7.Q16HDRI: 'linker' input unused
clang: warning: -lMagickCore-7.Q16HDRI: 'linker' input unused
clang: warning: -lMagick++-7.Q16HDRI: 'linker' input unused
clang: warning: -lMagickWand-7.Q16HDRI: 'linker' input unused
clang: warning: -lMagickCore-7.Q16HDRI: 'linker' input unused
clang: warning: argument unused during compilation: '-L/usr/local/Cellar/imagemagick/7.0.5-2/lib'
clang: warning: argument unused during compilation: '-L/usr/local/Cellar/imagemagick/7.0.5-2/lib'
In file included from sample.cc:24:
In file included from ./sample.h:25:
./cyktable.h:53:1: warning: 'CYKcell' defined as a struct
here but previously declared as a class
[-Wmismatched-tags]
struct CYKcell{
^
./production.h:22:1: note: did you mean struct here?
class CYKcell;
^~~~~
struct
sample.cc:40:35: error: no member named 'redQuantum' in
'Magick::Color'
data[y][x] = 255*((float)pc.redQuantum()/MaxRGB);
~~ ^
sample.cc:40:48: error: use of undeclared identifier
'MaxRGB'
data[y][x] = 255*((float)pc.redQuantum()/MaxRGB);
^
sample.cc:209:15: error: C++ requires a type specifier for
all declarations
Color white(MaxRGB,MaxRGB,MaxRGB);
^
sample.cc:209:22: error: C++ requires a type specifier for
all declarations
Color white(MaxRGB,MaxRGB,MaxRGB);
^
sample.cc:209:22: error: redefinition of parameter 'MaxRGB'
sample.cc:209:15: note: previous declaration is here
Color white(MaxRGB,MaxRGB,MaxRGB);
^
sample.cc:209:29: error: unknown type name 'MaxRGB'
Color white(MaxRGB,MaxRGB,MaxRGB);
^
sample.cc:209:14: warning: parentheses were disambiguated
as a function declaration [-Wvexing-parse]
Color white(MaxRGB,MaxRGB,MaxRGB);
^~~~~~~~~~~~~~~~~~~~~~
sample.cc:209:15: note: add a pair of parentheses to
declare a variable
Color white(MaxRGB,MaxRGB,MaxRGB);
^
( )
sample.cc:224:37: error: no member named 'redQuantum' in
'Magick::Color'
vec[i*15+j] = 255*((float)(pc.redQuantum())/MaxRGB);
~~ ^
sample.cc:224:51: error: use of undeclared identifier
'MaxRGB'
vec[i*15+j] = 255*((float)(pc.redQuantum())/MaxRGB);
^
2 warnings and 8 errors generated.
make: *** [sample.o] Error 1
System:
macOS Sierra
installed imageMagick using
brew install ImageMagick
error log: