Error in ImageMagick linking on SnowLeopard
Posted: 2010-05-24T02:57:36-07:00
Hi,
I am currently working on Qt/Image Magick project. But I am not able to create sample project on mac OS X snow leopard. I have downloaded Image Magick binary from website "http://www.imagemagick.org/www/binary-releases.html" . After installing it, i have added header include path "/opt/local/include" in Xcode's header search path and "/opt/local/lib" as library search path. Also i copied "libMagick++.3.dylib", "libMagickCore.3.dylib" and "libMagickWand.3.dylib" in my Xcode project. Compilation is fine but linking is showing following warnings -
ld: warning: in /Qt_Project/libMagick++.3.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /Qt_Project/libMagickCore.3.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /Qt_Project/libMagickWand.3.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
and following errors-
"Magick::InitializeMagick(char const*)", referenced from:_main in main.o
"Magick::Image::~Image()", referenced from: _main in main.o
"Magick::Image::Image(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from: _main in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
I used file command with dylib -file /opt/local/lib/libMagick++.3.dylib
and it is showing -
/opt/local/lib/libMagick++.3.dylib: Mach-O 64-bit dynamically linked shared library x86_64
I guessed i am linking with wrong dylib.
My Questions are-
1- How to get right installer for mac OS X snowleopard?
2- Name of the dylibs to include in project?
3- Do i need different installer for mac OS 10.5?
Please help me as i am running out of time.
Any sample project will be more helpful.
Thanks
I am currently working on Qt/Image Magick project. But I am not able to create sample project on mac OS X snow leopard. I have downloaded Image Magick binary from website "http://www.imagemagick.org/www/binary-releases.html" . After installing it, i have added header include path "/opt/local/include" in Xcode's header search path and "/opt/local/lib" as library search path. Also i copied "libMagick++.3.dylib", "libMagickCore.3.dylib" and "libMagickWand.3.dylib" in my Xcode project. Compilation is fine but linking is showing following warnings -
ld: warning: in /Qt_Project/libMagick++.3.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /Qt_Project/libMagickCore.3.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in /Qt_Project/libMagickWand.3.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
and following errors-
"Magick::InitializeMagick(char const*)", referenced from:_main in main.o
"Magick::Image::~Image()", referenced from: _main in main.o
"Magick::Image::Image(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from: _main in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
I used file command with dylib -file /opt/local/lib/libMagick++.3.dylib
and it is showing -
/opt/local/lib/libMagick++.3.dylib: Mach-O 64-bit dynamically linked shared library x86_64
I guessed i am linking with wrong dylib.
My Questions are-
1- How to get right installer for mac OS X snowleopard?
2- Name of the dylibs to include in project?
3- Do i need different installer for mac OS 10.5?
Please help me as i am running out of time.
Any sample project will be more helpful.
Thanks