使用Mac在Qt上设置ImageMagick。 LIBS和INCLUDEPATH

时间:2010-11-11 12:58:42

标签: c++ qt qt4 imagemagick osx-leopard

我想构建一个跨平台应用程序,它将利用imagemagick库对所选图像执行各种操作。 我从我的终端安装了库,正如我所看到的, Lib文件位于:/ opt / local / lib 并包含以下文件:/ opt / local / include / ImageMagick

我试图打开这里附带的示例如何在QT 4.0中查看QImage和QLabel中的tiff图像

但是当我尝试编译它时,问题报告窗口显示以下消息

Path:            /Users/macmini/imageviewer-build-desktop/imageviewer.app/Contents/MacOS/imageviewer
Identifier:      imageviewer
Version:         ??? (???)
Code Type:       X86-64 (Native)
Parent Process:  Qt Creator [25220]

Date/Time:       2010-11-10 20:22:29.852 +0000
OS Version:      Mac OS X 10.6.4 (10F569)
Report Version:  6

Interval Since Last Report:          146256 sec
Crashes Since Last Report:           4
Per-App Crashes Since Last Report:   4
Anonymous UUID:                      2FA19EA1-D3CE-479B-B074-AB6A297BEFCF

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Crashed Thread:  0

Dyld Error Message:
  Library not loaded: /usr/local/lib/libMagick++.4.dylib
  Referenced from: /Users/macmini/imageviewer-build-desktop/imageviewer.app/Contents/MacOS/imageviewer
  Reason: image not found

Model: Macmini2,1, BootROM MM21.009A.B00, 2 processors, Intel Core 2 Duo, 2 GHz, 2 GB, SMC 1.19f0
Graphics: Intel GMA 950, GMA 950, Built-In, spdisplays_integrated_vram
Memory Module: global_name
AirPort: spairport_wireless_card_type_airport_extreme (0x168C, 0x86), Atheros 5424: 2.0.19.10
Bluetooth: Version 2.3.3f8, 2 service, 19 devices, 1 incoming serial ports
Network Service: Ethernet, Ethernet, en0
Serial ATA Device: Hitachi HTS541612J9SA00, 111.79 GB
Parallel ATA Device: PIONEER DVD-RW  DVR-K06
USB Device: 2.4Ghz wireless combo sets, 0x04fc  (SUNPLUS TECHNOLOGY CO., LTD.), 0x05d8, 0x1d100000
USB Device: Bluetooth USB Host Controller, 0x05ac  (Apple Inc.), 0x8205, 0x7d100000
USB Device: IR Receiver, 0x05ac  (Apple Inc.), 0x8240, 0x7d200000

如果我转到Qt应用程序输出,我看到的是

Starting /Users/macmini/imageviewer-build-desktop/imageviewer.app/Contents/MacOS/imageviewer...
dyld: Library not loaded: /usr/local/lib/libMagick++.4.dylib
  Referenced from: /Users/macmini/imageviewer-build-desktop/imageviewer.app/Contents/MacOS/imageviewer
  Reason: image not found
The program has unexpectedly finished.
/Users/macmini/imageviewer-build-desktop/imageviewer.app/Contents/MacOS/imageviewer exited with code 0

代码说Image找不到,但正如我所看到的,代码并没有尝试读取任何硬编码图像。

任何人都可以帮我设置吗?

我哪里出错了?

我只想让图书馆使用qt

谢谢

1 个答案:

答案 0 :(得分:0)

恰好Kamil Klimek @This错误简单地说,你的应用程序找不到libMagick ++。4.dylib at location / usr / local / lib /检查库是否在那里

文件丢失了。我复制了,一切正常! 非常感谢你