I am trying to get a screen shot using the following code;
Code: Select all
#include <stdio.h>
#include </wand/MagickWand.h>
int main(int argc, char **argv)
{
MagickWandGenesis();
MagickWand *wand = NULL;
wand = NewMagickWand();
MagickReadImage(wand,"x:root"); // <-- Invoke ImportImageCommand
MagickWriteImage(wand,"screen_shot.png");
if(wand)wand = DestroyMagickWand(wand);
MagickWandTerminus();
return 0;
}
- $ make screenshot
cc screenshot.c -o screenshot
In file included from /wand/MagickWand.h:29:0,
from screenshot.c:2:
/magick/magick-config.h:29:3: warning: #warning "you should set MAGICKCORE_QUANTUM_DEPTH to sensible default set it to configure time default"
/magick/magick-config.h:30:3: warning: #warning "this is an obsolete behavior please fix your makefile"
/magick/magick-config.h:52:3: warning: #warning "you should set MAGICKCORE_HDRI_ENABLE to sensible default set it to configure time default"
/magick/magick-config.h:53:3: warning: #warning "this is an obsolete behavior please fix yours makefile"
In file included from /wand/MagickWand.h:70:0,
from screenshot.c:2:
/magick/MagickCore.h:29:36: fatal error: magick/magick-config.h: No such file or directory
compilation terminated.
<builtin>: recipe for target `screenshot' failed
make: *** [screenshot] Error 1
Thanks