我想在ns3中使用GnuplotHelper来绘制结果。即使我运行ns3的默认示例seventh.cc,我也会收到以下错误:
../scratch/congestion.cc: In function ‘int main(int, char**)’:
../scratch/congestion.cc:173:1: error: ‘GnuplotHelper’ was not declared in this scope
GnuplotHelper plotHelper;
^
../scratch/congestion.cc:180:1: error: ‘plotHelper’ was not declared in this scope
plotHelper.ConfigurePlot ("Test","CongestionWindow vs. Time","Time (Seconds)","CongestionWindow","jpg");
^
../scratch/congestion.cc:181:81: error: ‘GnuplotAggregator’ has not been declared
plotHelper.PlotProbe (probeName,probeTrace,"CongetionWindow","CongestionWindow",GnuplotAggregator::KEY_BELOW);
如果我添加“gnuplot-helper.h”,我会收到一条额外的行和同样的错误:
../scratch/seventh.cc:24:28: fatal error: gnuplot-helper.h: No such file or directory
compilation terminated.
我在我的linux上安装了gnuplot。我该怎么办?我怎样才能宣布Gnuplot帮助?
答案 0 :(得分:0)
首先,您安装了gnu-plot-dev软件包还是只安装了gnuplot?许多发行版将使用库的能力和针对它们的能力分开。
如果您确定包含文件实际位于您的系统某处(检查/ usr / include和/ usr / local / include /),则可能需要在编译器搜索路径中添加其他目录级别(可能是/ usr / include / gnuplot /但我只是在猜测。)
答案 1 :(得分:0)
尝试
#include "ns3/stats-module.h"