我在使用Eclipse 3.7.2尝试使用MathGL的Ubuntu 12.04 LTS上。 我的简单,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。
关于如何修复它的任何想法?
谢谢!
答案 0 :(得分:0)
您必须重新构建应用程序才能使用libpng-1.5.13。目前它是用1.2.46构建的。或者您可以阅读2个版本的发行说明,并确定1.2.46中支持的内容并保持在这些边界内。您必须尝试使用不在1.2.46
中的lidpng功能