Hi all, After painstakingly trying to install NS2 in my system, and havin errors in the compiling of mannasim patch with NS2, I received errors regarding the header file <list.h> and <vector.h>. It seems that these header files cannot be found.
The error: > In file included from mannasim/processing.h:44, > > from > mannasim/accessPointApp.h:45, > > from > mannasim/accessPointApp.cc:37: > > mannasim/sensorNode.h:36:18: error: list.h: No such file or > directory > > In file included from > mannasim/processing.h:45, > > from > mannasim/accessPointApp.h:45, > > from > mannasim/accessPointApp.cc:37: > > mannasim/sensedData.h:41:20: error: vector.h: No such file or > directory > In file included from > ./common/agent.h:41, > > from > mannasim/accessPointApp.h:40, > > from > mannasim/accessPointApp.cc:37: > > ./common/packet.h: In constructor > ?p_info::p_info()?: > > ./common/packet.h:184: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:185: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:186: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:187: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:188: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:189: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:190: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:191: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:192: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:193: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:194: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:195: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:196: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:197: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:198: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:199: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:200: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:201: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:202: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:203: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:205: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:206: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:207: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:208: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:209: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:210: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:212: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:213: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:214: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:215: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:216: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:217: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:218: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:219: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:220: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:221: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:222: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:223: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:224: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:225: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:227: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:228: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:230: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:231: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:232: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:235: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:238: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:241: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:244: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:247: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:250: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:254: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:258: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:259: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:261: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:262: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:265: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:268: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:271: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:274: warning: deprecated conversion from string constant > to ?char*? > ./common/packet.h:276: warning: deprecated conversion from string constant > to ?char*? > In file included from > mannasim/processing.h:44, > > from > mannasim/accessPointApp.h:45, > > from mannasim/accessPointApp.cc:37: > mannasim/sensorNode.h: At global scope: > mannasim/sensorNode.h:48: error: expected initializer before ?<? token > mannasim/sensorNode.h:73: error: ?AppList? does not name a type > In file included from mannasim/processing.h:45, > from mannasim/accessPointApp.h:45, > from mannasim/accessPointApp.cc:37: > mannasim/sensedData.h:49: error: expected initializer before ?<? token > mannasim/sensedData.h:50: error: expected initializer before ?<? token > mannasim/sensedData.h:65: error: ?AppDataList? does not name a type > mannasim/sensedData.h:105: error: ?AppDataList? does not name a type > In file included from mannasim/processing.h:47, > from mannasim/accessPointApp.h:45, > from mannasim/accessPointApp.cc:37: > mannasim/dataGenerator.h: In member function ?virtual AppData* > DataGenerator::collect()?: > mannasim/dataGenerator.h:94: warning: no return statement in function > returning non-void > mannasim/dataGenerator.h: In member function ?virtual AppData* > DataGenerator::getMaximumAllowedValue()?: > mannasim/dataGenerator.h:132: warning: no return statement in function > returning non-void > mannasim/accessPointApp.cc: In member function ?virtual void > AccessPointApp::process_data(int, AppData*)?: > mannasim/accessPointApp.cc:72: error: ?ON_DEMAND_DATA? was not declared in > this scope > mannasim/accessPointApp.cc:79: error: ?AppDataList? was not declared in > this scope > mannasim/accessPointApp.cc:79: error: expected `;' before ?list? > mannasim/accessPointApp.cc:81: error: expected primary-expression before > ?int? > mannasim/accessPointApp.cc:81: error: expected `)' before ?int? > mannasim/accessPointApp.cc:83: error: ?AppDataList? is not a class or > namespace > mannasim/accessPointApp.cc:83: error: expected `;' before ?it? > mannasim/accessPointApp.cc:83: error: ?it? was not declared in this scope > mannasim/accessPointApp.cc:83: error: missing template arguments before ?.? > token > mannasim/accessPointApp.cc: In member function ?virtual void > AccessPointApp::forward_data(int, AppData*)?: > mannasim/accessPointApp.cc:97: error: ?AppDataList? was not declared in > this scope > mannasim/accessPointApp.cc:97: error: expected `;' before ?list? > mannasim/dataGenerator.h: At global scope: > mannasim/dataGenerator.h:65: warning: inline function ?virtual void > EventTimer::expire(Event*)? used but never defined > mannasim/dataGenerator.h:52: warning: inline function ?virtual void > SensingTimer::expire(Event*)? used but never defined > mannasim/sensorBaseApp.h:83: warning: inline function ?virtual void > DisseminatingTimer::expire(Event*)? used but never defined > make: *** [mannasim/accessPointApp.o] Error 1 > Ns make failed! After googling around (for many days) and trying different things, I found the solution. In GCC 4.3.3., the header #include <list.h> and #include <vector.h> has to be added like this: #include <list> #include <vector> They concerned files are: ns-allinone-2.29/ns-2.29/mannasim/dataGenerator.h ns-allinone-2.29/ns-2.29/mannasim/sensorNode.h ns-allinone-2.29/ns-2.29/mannasim/sensedData.h ns-allinone-2.29/ns-2.29/mannasim/diffusion/commonNodeDiffApp.h ns-allinone-2.29/ns-2.29/mannasim/leach/rca/rca-ll.cc ns-allinone-2.29/ns-2.29/mannasim/leach/apps/leachApp.h The information regarding the header was taken from: http://www.tsenyurt.com/?p=105 Regards, Ravit
