LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ns-2 error Duplicate case value when compiling (https://www.linuxquestions.org/questions/linux-newbie-8/ns-2-error-duplicate-case-value-when-compiling-4175521171/)

mhm13819 10-06-2014 06:01 AM

ns-2 error Duplicate case value when compiling
 
Hello,
I have changed ns2 files and now when I make ns it reports an error saying
"diffusion3/filters/diffusion/one_phase_pull.cc: In member function 'void OnePhasePullFilter:rocessOldMessage(Message*)':
diffusion3/filters/diffusion/one_phase_pull.cc:1106: error: duplicate case value
diffusion3/filters/diffusion/one_phase_pull.cc:1081: error: previously used here
"
Can anyone help me solving this error? Please help me.

knudfl 10-06-2014 06:29 AM

Please describe what you changed, and why.
? This new function / protocol that you have added :
Has it got a name ?
And : Which version of ns-2.xx is it about ? ?

Your edited files.cc, files.h can be attached as files.cc.txt and files.h.txt.
I.e. suffix .txt is a must for text attachments.

* Attachments : The paper clip button in the 'Advanced Editor'.

-

mhm13819 10-06-2014 08:14 AM

Quote:

Originally Posted by knudfl (Post 5249603)
Please describe what you changed, and why.
? This new function / protocol that you have added :
Has it got a name ?
And : Which version of ns-2.xx is it about ? ?

Your edited files.cc, files.h can be attached as files.cc.txt and files.h.txt.
I.e. suffix .txt is a must for text attachments.

* Attachments : The paper clip button in the 'Advanced Editor'.

-

Dear knudfl
My ns version is ns-2.31. The files I changed are within the ns-2.31 directory such as mobiilenode.h,mobiilenode.cc mac802_11.h,mac802_11.cc,wireless-phy.cc and also adding new files in directories mobiwan and cognitive.
So I run ./configure then make clean and finally make. after some time it gives me that error while I've never changed the one_phase_pull.cc file at all!!!
Please help me to solve this error.
Thank you in advance.

knudfl 10-06-2014 08:49 AM

← Ref. #3 .

Please do not quote entire posts. A "one word reference" will do.
And : Duplicate posts are no allowed. Will be closed.

Ns-2.31 : OK . Which "mobiwan" and "cognitive" patch did you add ?
Please upload a tar.gz package with your changes / additional files,
→ to e.g. Google Docs → →

→ { mobilenode.h, mobilenode.cc, mac802_11.h, mac802_11.cc,
wireless-phy.cc, etc. + {mobiwan/files, cognitive/files},
{ + the patches that was added for mobiwan, cognitive } }.

And why ns-2.31 ? Is it about "TFRC-CR" ?
(TFRC-CRAN is th only known "patch" with a cognitive/ folder)
https://github.com/abdulla-alali/TFRC-CR

And, repeat : Why did you edit files ? ?


-

knudfl 10-08-2014 07:22 AM

Continues here http://www.linuxquestions.org/questi...ng-4175521424/

And here http://www.linuxquestions.org/questi...ng-4175521427/

mhm13819 10-11-2014 04:01 AM

ns-2 error Duplicate case value when compiling
 
Dear knudfl,
Can you solve the problem? Could you access the ns-2.31 file I uploaded????

knudfl 10-11-2014 04:46 AM

← #6 .

Well, it will take some time to sort out the messy package,
mehran.tar.gz, that you delivered.

So far I have found out that you didn't add any files.
I.e. adding a file-xx.cc doesn't matter,
when it has no entry in the Makefile.in : file-xx.o

Other : CRAHN will not work out of the box
with any mobiwan version added.

Generally about your error :
All things are connected together in ns2.
So declaring something that is already declared in another file,
may cause no compiling / linking issues with those files,
but appear as an error when compiling / linking a third file.


It would help if you can supply an exact list of the edited files.
+ make a package-edited.tar.gz with the edited files / edited code :
*** The line numbers for the edited code etc.
must be thoroughly and comprehensively documented.


-


All times are GMT -5. The time now is 12:14 AM.