Page 1 of 1

magick-config.h not found C program

Posted: 2013-05-02T22:15:06-07:00
by sl235
Hi,

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;
}
however I am getting the following error message, magick-config.h is in the specified folder 'magick/magick-config.h' , I do not understand what the problem is;
  • $ 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
Any help would be much appreciated.

Thanks