【发布时间】:2015-01-22 17:34:15
【问题描述】:
我知道以前有人问过这方面的问题,但我无法使用他们的任何解决方案来解决我的问题。我正在尝试将 Mac 上的 DISLIN 绘图库与 Xcode 一起使用。 (操作系统:优胜美地,Xcode 版本:6.1.1)。
我目前只是尝试运行一个非常简单的测试程序:
#include <stdio.h>
#include <iostream> // Required by DISLIN!
#include "dislin.h" // Required by DISLIN! Includes the
// plotting package
using namespace std;
int main(int argc, char *argv[])
{
int numberOfPoints = 2;
float x[2] = {0, 1};
float y[2] = {0, 2};
cout << x << y << endl ;
qplot(x, y, numberOfPoints);
}
我在尝试运行时遇到的错误是:
dyld: Library not loaded: /usr/local/lib/libdiscpp.10.dylib
Referenced from: /Users/user/Library/Developer/Xcode/DerivedData/phys239_a2-blbdrjqdqxewuwfvvdxelytbfmzs/Build/Products/Debug/phys239_a2
Reason: image not found
Program ended with exit code: 9
程序编译得很好,但它不会运行。我已经使用来自 dislin 网站 (dislin.de) 的软件包和通过 homebrew 的 openmotif 安装了 Dislin。我的项目与 dislin 和 openmotif 库(分别位于 /usr/local/dislin/ 和 /usr/local/Cellar/openmotif/2.3.4/lib )链接。
有人有这方面的经验吗?或者,之前有没有人能够让 dislin 与 Xcode 一起工作?
【问题讨论】: