我正在尝试使用Graphics.GD
:
Prelude> import Graphics.GD
Prelude Graphics.GD> x <- loadPngFile "test.png"
但我不断收到此错误:
Loading package array-0.4.0.1 ... linking ... done.
Loading package deepseq-1.3.0.1 ... linking ... done.
Loading package bytestring-0.10.0.2 ... linking ... done.
Loading package gd-3000.7.3 ... can't load .so/.DLL for: libgd.dylib (dlopen(libgd.dylib, 9): image not found)
ghci
二进制文件来自 MacPorts,软件包gd
由cabal install gd
. 有libgd.dylib
,/opt/local/lib
由 MacPorts 安装。我究竟做错了什么?