我在 Ubuntu 12.04 LTS 上使用 Eclipse 3.7.2 尝试使用 MathGL。我简单的 C++ 看起来像:
#include <iostream>
#include <mgl2/mgl.h>
using namespace std;
int main() {
mglGraph gr;
gr.FPlot("sin(pi*x)");
gr.WritePNG("test.png");
return 0;
}
当我运行它时,我收到以下警告:
libpng warning: Application built with libpng-1.2.46 but running with 1.5.13
并且 test.png 无法显示。
关于如何解决它的任何想法?
谢谢!