- Home Page of ProjectGuideline.com ›
- Forums ›
- Get Help to do your B.E., and M.E., M.Tech., & M.S., Project in Ns2 ›
- (.text+0x6b13): undefined reference to function_name
hi
Dear ns-users
i use *”make clean”* and *”make”* for run trust based routing in DSR but i
give some error such this
help me please
this code is refer to Mr Leonard conard
dsr/dsragent.o: In function
`DSRAgent::returnSrcRouteToRequestor(SRPacket&)’:
dsragent.cc:(.text+0x8cf): undefined reference to
`TrustManager::initNewTrustValues(Path&, int)’
dsr/dsragent.o: In function
`DSRAgent::returnSrcRteForOutsideDomainToRequestor(SRPacket&)’:
dsragent.cc:(.text+0xd11): undefined reference to
`TrustManager::initNewTrustValues(Path&, int)’
dsr/dsragent.o: In function `DSRAgent::sendOutPacketWithRoute(SRPacket&,
bool, double)’:
dsragent.cc:(.text+0x1219): undefined reference to
`ACKMonitor::addACK(double, int*, int, double)’
dsr/dsragent.o: In function `DSRAgent::sendRouteShortening(SRPacket&, int,
int)’:
collect2: ld returned 1 exit status
make: *** [ns] Error 1
Best regards,
The function TrustManager::initNewTrustValues(Path&, int) should have a prototype in the corresponding header file.
Some times, even if you are having prototype defined in header file, you may see this error due to type mismatch in arguments or return type. If it is the cause of the error then use type cast. (Some version of compiler can handle this without type casting. So you will not get such errors in different version of linux/gcc)