ImageMagick没有这样的文件或目录 [英] ImageMagick No such file or directory
问题描述
我正在尝试使用以下代码获取屏幕截图;
I am trying to get a screen shot using the following code;
#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;
}
但是我收到以下错误消息,magick-config.h在指定的文件夹'magick / magick-config.h',我不明白是什么问题;
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
非常感谢任何帮助。
谢谢
推荐答案
是的,实际上我遇到了类似的问题,当我使用以下命令安装软件包 libmagickcore-dev
时,它已修复:
Yes, Actually I had a problem like that and it was fixed when I installed the package libmagickcore-dev
with following command:
sudo apt-get install libmagickcore-dev
sudo apt-get install libmagickcore-dev
通过Ubuntu存储库。 :-)
through the Ubuntu Repositories. :-)
此外,如果它不起作用,您尝试安装名为graphicsmagick-libmagick-dev-compat的软件包。
AC;
Also If it did not work, you try installing the package called "graphicsmagick-libmagick-dev-compat". AC;
这篇关于ImageMagick没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!