在Mac Lion上,我完成了配置,制作和安装ImageMagick的静态版本.一切都很顺利,因为配置我得到了
configuring ImageMagick 6.7.2-4 checking build system type... x86_64-apple-darwin11.1.0 checking host system type... x86_64-apple-darwin11.1.0 checking target system type... x86_64-apple-darwin11.1.0 ....
但是当我尝试在我自己的应用程序中使用静态库时,链接器会向我发送数百个链接错误,例如...
Undefined symbols for architecture x86_64:
"_XOpenDisplay", referenced from:
_RenderType in libMagickCore.a(magick_libMagickCore_la-annotate.o)
_DisplayImages in libMagickCore.a(magick_libMagickCore_la-display.o)
...
"_XInitImage", referenced from:
_ReadXWDImage in libMagickCore.a(magick_libMagickCore_la-xwd.o)
ld: symbol(s) not found for architecture x86_64
这是我的LIBS声明
LIBS += -L/Library/ImageMagick-6.7.2-4/magick/.libs \ -L/Library/ImageMagick-6.7.2-4/magick \ -L/Library/ImageMagick-6.7.2-4/wand/.libs \ -L/Library/ImageMagick-6.7.2-4/wand \ -L/usr/X11/lib \ -R/usr/X11/lib \ -L/opt/local/lib \ -L/opt/lib \ -lMagick++ \ -lMagickCore \ -lMagickWand \ -ltiff \ -lfreetype \ -ljpeg …
imagemagick ×1