Hai Everybody, For linking the c++ code with otcl script, I have included the C++ code and it's object file under the ns2 directory and used make command to re-compile it for the changes included. But it is producing the following errors ... So, Kindly suggest me some guidelines regarding this ....
[r...@localhost ns-2.34]# g++ -c greedy4.c++ linkage.tcl:1: error: ‘set’ does not name a type agent.h:37: error: expected class-name before ‘{’ token greedy4.c++:35: error: extra qualification ‘GreedyBound::’ on member ‘readmatrix’ greedy4.c++:35: error: ‘void GreedyBound::readmatrix()’ cannot be overloaded greedy4.c++:21: error: with ‘void GreedyBound::readmatrix()’ greedy4.c++:56: error: extra qualification ‘GreedyBound::’ on member ‘distance’ greedy4.c++:56: error: ‘void GreedyBound::distance()’ cannot be overloaded greedy4.c++:19: error: with ‘void GreedyBound::distance()’ greedy4.c++:69: error: extra qualification ‘GreedyBound::’ on member ‘greedy’ greedy4.c++:69: error: ‘void GreedyBound::greedy(int)’ cannot be overloaded greedy4.c++:20: error: with ‘void GreedyBound::greedy(int)’ greedy4.c++:108: error: extra qualification ‘GreedyBound::’ on member ‘findangle’ greedy4.c++:108: error: ‘void GreedyBound::findangle(double, double, double)’ cannot be overloaded greedy4.c++:23: error: with ‘void GreedyBound::findangle(double, double, double)’ greedy4.c++:159: error: extra qualification ‘GreedyBound::’ on member ‘display’ greedy4.c++:159: error: ‘void GreedyBound::display(int)’ cannot be overloaded greedy4.c++:22: error: with ‘void GreedyBound::display(int)’ greedy4.c++:184: error: expected class-name before ‘{’ token greedy4.c++:192: error: cannot define member function ‘GreedyBound::BsrAgent::BsrAgent’ within ‘GreedyBound’ greedy4.c++:201: error: cannot define member function ‘GreedyBound::BsrAgent::command’ within ‘GreedyBound’ greedy4.c++:210: error: cannot define member function ‘GreedyBound::BsrAgent::MyprivateFunc’ within ‘GreedyBound’ greedy4.c++:216: error: expected `}' at end of input greedy4.c++: In member function ‘void GreedyBound::readmatrix()’: greedy4.c++:37: error: ‘Tcl’ was not declared in this scope greedy4.c++:37: error: ‘tcl’ was not declared in this scope greedy4.c++:37: error: ‘Tcl’ is not a class or namespace greedy4.c++: In member function ‘void GreedyBound::distance()’: greedy4.c++:60: error: ‘Tcl’ was not declared in this scope greedy4.c++:60: error: ‘tcl’ was not declared in this scope greedy4.c++:60: error: ‘Tcl’ is not a class or namespace greedy4.c++: In member function ‘void GreedyBound::greedy(int)’: greedy4.c++:72: error: ‘Tcl’ was not declared in this scope greedy4.c++:72: error: ‘tcl’ was not declared in this scope greedy4.c++:72: error: ‘Tcl’ is not a class or namespace greedy4.c++:74: error: no matching function for call to ‘GreedyBound::GreedyBound()’ greedy4.c++:11: note: candidates are: GreedyBound::GreedyBound(const GreedyBound&) greedy4.c++: In member function ‘void GreedyBound::findangle(double, double, double)’: greedy4.c++:111: error: ‘Tcl’ was not declared in this scope greedy4.c++:111: error: ‘tcl’ was not declared in this scope greedy4.c++:111: error: ‘Tcl’ is not a class or namespace greedy4.c++: In member function ‘void GreedyBound::display(int)’: greedy4.c++:161: error: ‘Tcl’ was not declared in this scope greedy4.c++:161: error: ‘tcl’ was not declared in this scope greedy4.c++:161: error: ‘Tcl’ is not a class or namespace greedy4.c++: In constructor ‘GreedyBound::BsrAgentClass::BsrAgentClass()’: greedy4.c++:186: error: class ‘GreedyBound::BsrAgentClass’ does not have any field named ‘TclClass’ greedy4.c++: In static member function ‘static TclObject* GreedyBound::BsrAgentClass::create(int, const char* const*)’: greedy4.c++:188: error: cannot convert ‘GreedyBound::BsrAgent*’ to ‘TclObject*’ in return greedy4.c++: At global scope: greedy4.c++:189: error: expected unqualified-id at end of input [r...@localhost ns-2.34] Thanking You, Gayathri Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! http://downloads.yahoo.com/in/internetexplorer/