Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 是否可以在Mac上使用自定义libxml2编译ImageMagick_C++_Macos_Makefile_Imagemagick_Configure - Fatal编程技术网

C++ 是否可以在Mac上使用自定义libxml2编译ImageMagick

C++ 是否可以在Mac上使用自定义libxml2编译ImageMagick,c++,macos,makefile,imagemagick,configure,C++,Macos,Makefile,Imagemagick,Configure,它似乎总是从/usr/lib获取版本,并且似乎没有一个./configure参数来覆盖它 ./configure--prefix=$prefix--with quantum depth=8--disable installed--without-x--without perl--enable static--disable shared--with jpeg--with tiff CPPFLAGS=“$CPPFLAGS”LDFLAGS=“$LDFLAGS”CFLAGS=“$CFLAGS”--di

它似乎总是从/usr/lib获取版本,并且似乎没有一个./configure参数来覆盖它

./configure--prefix=$prefix--with quantum depth=8--disable installed--without-x--without perl--enable static--disable shared--with jpeg--with tiff CPPFLAGS=“$CPPFLAGS”LDFLAGS=“$LDFLAGS”CFLAGS=“$CFLAGS”--disable openmp--disable openmp-disable openmp slow

谢谢,
Rui

您可以手动编辑由./configure生成的Makefile吗


编辑:或者,您可以设置一个XML2_CONFIG环境变量,指向自定义安装的XML2 CONFIG脚本。

通常,
libxml2
的安装包括一个配置脚本
xml2 config
,该库的用户使用该脚本查找其组件和其他构建信息的正确路径。苹果提供的libxml2版本在
/usr/bin
中有
xml2配置。如果您安装了另一个版本的
libxml2
,请确保设置了$PATH,以便ImageMagick配置脚本首先找到它的
xml2 config
:因此确保最有可能是
/usr/local/bin
/opt/local/bin
(MacPorts)或
/sw/bin
(Fink)中的一个位于$PATH上的
/usr/bin
之前

更简单的解决方案可能是让MacPorts为您安装:

$ sudo port install ImageMagick

嗯,我发现MacPorts不交叉编译的困难之处(这有一个功能要求)。因为我想为10.5和10.6版本编译我的应用程序,所以我不得不编译所有依赖库手册,比如libpng、libtiff等等。。。顺便说一句,libxml2开始工作了。谢谢