在 Mac 上的 Qt 上设置 ImageMagick。 LIBS 和 INCLUDEPATH

发布于 2024-10-02 15:05:29 字数 2488 浏览 9 评论 0原文

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

我尝试打开此处附加的示例How to view tiff images in QImage and QLabel in QT 4.0

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

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

代码显示“找不到图像”,但正如我所看到的,代码不会尝试读取任何硬编码图像。

谁能帮我设置这个吗?

我哪里出错了?

我只是想让库与 qt 一起工作

谢谢

I would like to build a cross platform application that will make use of imagemagick library in order to perform various actions to selected images.
I have installed the library from my terminal and as I can see,
Lib files are located at: /opt/local/lib
and include files at: /opt/local/include/ImageMagick

I tried to open the example attached here How to view tiff images in QImage and QLabel in QT 4.0

But when i try to compile it, the problem report window displays the following message

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

If I go to the Qt Application Output all I see is

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

the code says Image not find but as I can see, the code doesnt try to read any hard coded images.

Can anyone help me set up this ?

Where do I go wrong ?

I just want to make the library work with qt

Thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

浮华 2024-10-09 15:05:29

确切地说,Kamil Klimek @这个错误只是说,您的应用程序无法在位置 /usr/local/lib/ 找到 libMagick++.4.dylib 检查库是否在那里

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

Exactly Kamil Klimek @This error simply says, that you application can't find libMagick++.4.dylib at location /usr/local/lib/ check if library is there

The file was missing. I copied and everything worked!
Thank you so much

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文