I develop my model inside the /src/myModel/model sub-directory.
I have just created a class that requires a member of type "Ipv4AddressHelper" .
Naturally, I should have included "ns3/internet-module.h" in my header file, right?
but I got a lot of unfamiliar errors coming from ./ns3/ipv4-header.h (shown below).
p.s. : I also tried to link 'internet' but it didn't change anything(did I have to add anything else?)
I appreciate your kind help. Thie is the error
In file included from ./ns3/ip-l4-protocol.h:29:0,
from ./ns3/ipv4.h:27,
from ./ns3/ipv4-interface-container.h:6,
from ./ns3/ipv4-address-helper.h:24,
from ./ns3/smb_base_ip.h:17,
from ./ns3/simmobility-module.h:14,
from ../src/simmobility/examples/simmobility-example.cc:13:
./ns3/ipv4-header.h:88:7: error: expected identifier before numeric constant
./ns3/ipv4-header.h:88:7: error: expected ‘}’ before numeric constant
./ns3/ipv4-header.h:88:7: error: expected unqualified-id before numeric constant
./ns3/ipv4-header.h:99:17: error: variable or field ‘SetDscp’ declared void
./ns3/ipv4-header.h:99:17: error: ‘DscpType’ was not declared in this scope
./ns3/ipv4-header.h:159:34: error: non-member function ‘uint16_t ns3::GetPayloadSize()’ cannot have cv-qualifier
./ns3/ipv4-header.h:163:37: error: non-member function ‘uint16_t ns3::GetIdentification()’ cannot have cv-qualifier
./ns3/ipv4-header.h:167:25: error: non-member function ‘uint8_t ns3::GetTos()’ cannot have cv-qualifier
./ns3/ipv4-header.h:171:3: error: ‘DscpType’ does not name a type
./ns3/ipv4-header.h:175:33: error: ‘DscpType’ was not declared in this scope
./ns3/ipv4-header.h:175:48: error: expected ‘,’ or ‘;’ before ‘const’
./ns3/ipv4-header.h:179:25: error: non-member function ‘ns3::EcnType ns3::GetEcn()’ cannot have cv-qualifier
./ns3/ipv4-header.h:183:45: error: non-member function ‘std::string ns3::EcnTypeToString(ns3::EcnType)’ cannot have cv-qualifier
./ns3/ipv4-header.h:187:30: error: non-member function ‘bool ns3::IsLastFragment()’ cannot have cv-qualifier
./ns3/ipv4-header.h:191:30: error: non-member function ‘bool ns3::IsDontFragment()’ cannot have cv-qualifier
./ns3/ipv4-header.h:195:37: error: non-member function ‘uint16_t ns3::GetFragmentOffset()’ cannot have cv-qualifier
./ns3/ipv4-header.h:199:25: error: non-member function ‘uint8_t ns3::GetTtl()’ cannot have cv-qualifier
./ns3/ipv4-header.h:203:30: error: non-member function ‘uint8_t ns3::GetProtocol()’ cannot have cv-qualifier
./ns3/ipv4-header.h:207:32: error: non-member function ‘ns3::Ipv4Address ns3::GetSource()’ cannot have cv-qualifier
./ns3/ipv4-header.h:211:37: error: non-member function ‘ns3::Ipv4Address ns3::GetDestination()’ cannot have cv-qualifier
./ns3/ipv4-header.h:219:28: error: non-member function ‘bool ns3::IsChecksumOk()’ cannot have cv-qualifier
./ns3/ipv4-header.h:222:43: error: ‘virtual’ outside class declaration
./ns3/ipv4-header.h:222:43: error: non-member function ‘ns3::TypeId ns3::GetInstanceTypeId()’ cannot have cv-qualifier
./ns3/ipv4-header.h:223:41: error: ‘virtual’ outside class declaration
./ns3/ipv4-header.h:223:41: error: non-member function ‘void ns3::Print(std::ostream&)’ cannot have cv-qualifier
./ns3/ipv4-header.h:224:45: error: ‘virtual’ outside class declaration
./ns3/ipv4-header.h:224:45: error: non-member function ‘uint32_t ns3::GetSerializedSize()’ cannot have cv-qualifier
./ns3/ipv4-header.h:225:51: error: ‘virtual’ outside class declaration
./ns3/ipv4-header.h:225:51: error: non-member function ‘void ns3::Serialize(ns3::Buffer::Iterator)’ cannot have cv-qualifier
./ns3/ipv4-header.h:226:55: error: ‘virtual’ outside class declaration
./ns3/ipv4-header.h:227:1: error: expected unqualified-id before ‘private’
./ns3/ipv4-header.h:238:18: error: expected initializer before ‘:’ token
./ns3/ipv4-header.h:239:18: error: expected initializer before ‘:’ token
./ns3/ipv4-header.h:240:23: error: expected initializer before ‘:’ token
./ns3/ipv4-header.h:241:20: error: expected initializer before ‘:’ token
./ns3/ipv4-header.h:250:1: error: expected declaration before ‘}’ token
./ns3/ipv4-header.h:221:17: error: ‘ns3::TypeId ns3::GetTypeId()’ declared ‘static’ but never defined [-Werror=unused-function]