2017-12-13 12 views
0

結果をプロットするのにns3にGnuplotHelperを使用します。私はNS3のデフォルトの例seventh.ccを実行する場合でも、私は次のエラーを取得する:ns3でGnuplotHelperを宣言できませんでした

../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. 

私は私の上のgnuplotをインストールしましたlinux。私は何をすべきか? Gnuplotヘルパーをどうやって宣言できますか?

答えて

0

まず、gnu-plot-devパッケージをインストールしましたかgnuplotだけをインストールしましたか?多くのディストリビューションでは、ライブラリを使用する能力とそれを開発する能力が分離されています。

実際にあなたのシステムにインクルードファイルがあることが確かな場合は(/ usr/includeと/ usr/local/include /の両方をチェックしてください)、コンパイラ検索パスに追加のディレクトリレベルusr/include/gnuplot /だが、私はそこでしか推測していない)。

+0

感謝を試してみてください。エラーはインクルードにありました。私はディレクトリns3 /を含めるべきだった。 –

0

#include "ns3/stats-module.h" 
関連する問題