Debug and test
How to debug and test particluar .cc file in ubuntu 12.04.
I dont want to run make command , but i want to test a particular .cc file, how to do this. After run make command i am getting following error Code:
IAODV::recvRequest(Packet*) I had tried following ways but they are giving error Code:
//struct hdr_iaodv_request *rq_sec = HDR_IAODV_REQUEST(p); //added by shyju |
error: ‘struct hdr_iaodv_request’ has no member named ‘rq_sec’
is where your error is you need to declare rq_sec before using it, also it would help to know what you are trying to compile and the particular file that the error is in, just saying you have an error wif a .cc filendoen't help much |
1 Attachment(s)
Quote:
I had declared , but the format is not correct, so it would be helpful if you provide correct format Following is the way in which i declared it, correct me if i am wrong //struct hdr_iaodv_request *rq_sec = HDR_IAODV_REQUEST(p); //added by shyju struct hdr_iaodv_request;//added by shyju hdr_iaodv_request rq_sec; //hdr_iaodv_request *rq_sec; //added by shyju //iaodv_rt_entry *rq_sec; //added by shyju Thanks a lot in advance |
Well you stil didn't answer the questions, but rq_sec is not declared anywhere in that file, if it is in a different file please post that as I can't find a declaration of rq_sec to check the syntax, if the declaration is not in any of the included headers in the file you posted you need to include the file where it is declared.
|
1 Attachment(s)
Quote:
thanks a lot in advance |
you commented out your decleration! remove the '//' from trhe start of the lines
|
Quote:
|
Well as you wont answer the question I originally asked ie "what are you trying to compile?" I'm flying blind, the structure "hdr_iaodv_request" has already been decleacred just above your commented out code here
Code:
struct hdr_ip *ih = HDR_IP(p); second you declare the struture hdr_iaodv_request as Code:
struct hdr_iaodv_request *rq = HDR_IAODV_REQUEST(p); You also seem to be confused as to the structure type 'hdr_iaodv_request' and the instance of the structure 'rq_sec'. I would suggest going back to basics and studing the syntax of structures and the differnce between types and instances, I think this bit of code is probably beyond what you know at the moment you need to know a bit more of the basics, and also agin what are you trying to compile? can you provide a link to the source? |
Re #8.
Quote:
http://www.linuxquestions.org/questions/tags/iaodv/ - |
Quote:
can just tell me which declaration of req_sec i should keep, so that i can try. |
Re #10.
Please use the right file names = aodv.cc , iaodv.cc . |
Quote:
|
Quote:
|
Quote:
|
Quote:
Code:
rq->rq_sec = index; ... Code:
struct hdr_iaodv_request *rq = HDR_IAODV_REQUEST(p); |
All times are GMT -5. The time now is 08:18 PM. |