我想用这个工具创建一个图表:http: //www.codecutter.net/tools/koolplot/
我使用eclipse + minGW
我以这种方式安装了koolplot:
Library installation for MingW:
Copy headers koolplot.h, Plotdata.h, Plotstream.h, winbgitypes.h and BGI_util.h To your MingW #include directory.
Copy library libkoolplot.a to your MingW lib directory.
但首先我必须修改 graphics.h 文件,然后我得到这个错误:
g++ -mwindows -o aplot.exe -lkoolplot -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32 -lstdc++ -lsupc++ -o plot.exe "src\\plot.o"
src\plot.o: In function `main':
...workspace\plot\Debug/../src/plot.cpp:5: undefined reference to `Plotdata::Plotdata(double, double)'
...plot\Debug/../src/plot.cpp:5: undefined reference to `operator*(double, Plotdata const&)'
...plot\Debug/../src/plot.cpp:5: undefined reference to `sin(Plotdata const&)'
...plot\Debug/../src/plot.cpp:5: undefined reference to `Plotdata::operator-(Plotdata const&) const'
...plot\Debug/../src/plot.cpp:6: undefined reference to `plot(Plotdata const&, Plotdata const&)'
collect2: ld returned 1 exit status
这是我的代码:
#include "koolplot.h"
int main()
{
plotdata x(-6.0, 6.0);
plotdata y = sin(x) + x/5;
plot(x, y);
return 0;
}
知道有什么问题吗?或者有人可以给我发送另一个好的(易于使用的)工具来创建图表吗?