On 09/26/2012 08:11 AM, x86tech wrote:
> from/<vsindhuja/gsoc-nat/> mercurial repo. This is the error while
> building using /./waf/ command:
>
> .......
>
> In file included from ./ns3/ipv4-nat.h:31,
> from ./ns3/ipv4-nat-helper.h:23,
> from ./ns3/internet-module.h:39,
> from ../examples/error-model/simple-error-model.cc:40:
> ./ns3/ipv4-netfilter.h:123: error: expected �,� or �...� before �>�
> token
> ./ns3/ipv4-netfilter.h:123: error: parse error in template argument list
> ./ns3/ipv4-netfilter.h:123: error: default argument for parameter of
> type �ns3::ContinueCallback� has type �<unresolved overloaded
> function type>�
> ./ns3/ipv4-netfilter.h:123: error: default argument missing for
> parameter 7 of �uint32_t ns3::Ipv4Netfilter::ProcessHook(uint8_t,
> ns3::Hooks_t, ns3::Ptr<ns3::Packet>, ns3::Ptr<ns3::NetDevice>,
> ns3::Ptr<ns3::NetDevice>, ns3::ContinueCallback, ns3::Ptr<ns3::Packet>)�
> In file included from ./ns3/ipv4-nat.h:31,
> from ./ns3/ipv4-nat-helper.h:23,
> from ./ns3/internet-module.h:39,
> from ../examples/energy/energy-model-example.cc:27:
> ./ns3/ipv4-netfilter.h:123: error: expected �,� or �...� before �>�
> token
> ./ns3/ipv4-netfilter.h:123: error: parse error in template argument list
> ./ns3/ipv4-netfilter.h:123: error: default argument for parameter of
> type �ns3::ContinueCallback� has type �<unresolved overloaded
> function type>�
> ./ns3/ipv4-netfilter.h:123: error: default argument missing for
> parameter 7 of �uint32_t ns3::Ipv4Netfilter::ProcessHook(uint8_t,
> ns3::Hooks_t, ns3::Ptr<ns3::Packet>, ns3::Ptr<ns3::NetDevice>,
> ns3::Ptr<ns3::NetDevice>, ns3::ContinueCallback, ns3::Ptr<ns3::Packet>)�
> ........
>
> Build failed
> -> task in 'simple-error-model' failed (exit status 1):
> {task 4562002576: cxx simple-error-model.cc ->
> simple-error-model.cc.1.o}
> ['/usr/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror',
> '-Wno-error=deprecated-declarations', '-fstrict-aliasing',
> '-Wstrict-aliasing', '-Ibuild', '-I.', '-I.',
> '-I/Users/reinier/repos/ns-3-allinone', '-DNS3_ASSERT_ENABLE',
> '-DNS3_LOG_ENABLE', '-DSQLITE3=1',
> '../examples/error-model/simple-error-model.cc', '-c', '-o',
> 'examples/error-model/simple-error-model.cc.1.o']
> -> task in 'energy-model-example' failed (exit status 1):
> {task 4561981392: cxx energy-model-example.cc ->
> energy-model-example.cc.1.o}
> ['/usr/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror',
> '-Wno-error=deprecated-declarations', '-fstrict-aliasing',
> '-Wstrict-aliasing', '-Ibuild', '-I.', '-I.',
> '-I/Users/reinier/repos/ns-3-allinone', '-DNS3_ASSERT_ENABLE',
> '-DNS3_LOG_ENABLE', '-DSQLITE3=1',
> '../examples/energy/energy-model-example.cc', '-c', '-o',
> 'examples/energy/energy-model-example.cc.1.o']
>
>
> and this is /src/internet/model/ipv4-netfilter.h/ line 123:
>
> uint32_t ProcessHook (uint8_t protocolFamily, Hooks_t hookNumber,
> Ptr<Packet> p,Ptr<NetDevice> in, Ptr<NetDevice> out,
> ContinueCallback cc = MakeNullCallback <uint32_t, Ptr<Packet> > ());
> //ContinueCallback ccb = defaultContinueCallback);
>
> I'm highlighting the part that possibly causes the error. I'm able to
> successfully build by replacing the highlighted with the commented line.
You may be looking at code that is not the freshest.
This code is still under development, but if you want to use the latest,
please pull the patches out of the code review referenced here:
http://mailman.isi.edu/pipermail/ns-developers/2012-August/010593.html
Specifically, apply patchsets 1 and 3 located here:
http://codereview.appspot.com/6454146/
- Tom