[英]Declaring GnuplotHelper failed in ns3
我想在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助手?
首先,您是否安装了gnu-plot-dev软件包或只是gnuplot? 许多发行版将使用库的能力与针对它们的开发能力区分开来。
如果确定包含文件确实在系统上的某个位置(同时检查/ usr / include和/ usr / local / include /),则可能需要在编译器搜索路径中添加其他目录级别(也许是/ usr / include / gnuplot /,但我只是在猜测)。
尝试
#include "ns3/stats-module.h"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.