Compiling threshold.cc
threshold.cc is a program to calculate the thresholds for transmission receipt using the relation between various physical parameters (distance, effect, propagation model etc.) related to transmissions in ns-2. It has to be compiled by the user. This is not a difficult task, but could pose some challenges as the compiler over time is updated and no longer accepts the outdated c-code of outdated versions of ns-2.
Trying to do g++ threshold.cc will break if trying this with a reasonably updated version of Ubuntu and the g++ compiler (v4.3.3) in combination with ns-2.33. Thus, to make it work, delete the line that reads
#include <iostream.h>
and write these three lines there instead:
#include <iostream>
#include <cstring>
using namespace std;
Then try to compile with g++ again:
g++ threshold.cc -o threshold
Thanks! It works perfectly! Been looking what’s wrong with it, unable to compile (very bad in programming lang. to understand).
=)
Stella
Monday, May 31, 2010 at 15:04
Thanks! It works perfectly! Been looking what’s wrong with it, unable to compile.
I wish everything good for you.
=)
Rafael
Thursday, July 22, 2010 at 22:42
nice post
thanks… very useful information
ariel
Monday, December 6, 2010 at 20:23
Glad to help!
Erlend
Monday, December 6, 2010 at 22:47
helped! Thank you!
Elis
Wednesday, December 8, 2010 at 10:23
Your post is very useful for me.Thank you!!!!
kokila
Sunday, February 20, 2011 at 4:50
Excellent post!
Helped me a lot!
[]‘s
Clederson
Tuesday, March 1, 2011 at 4:16
Thanks, now it works!
Alysson Oliveira
Saturday, June 25, 2011 at 19:12