0

I followed this and tried to resolve the error:

error: cast from ‘ns3::NaMPTSocket*’ to ‘uint32_t’ loses precision

But still I can't get it working. Any other way to solve this problem ?

I am on a 64 bit Ubuntu machine. The program (NS3) is being build using waf.

Community
  • 1
  • 1
adrian008
  • 395
  • 6
  • 18
  • 1
    This is a _duplicate_ of the linked question. You swapped `int` for `uint32_t` for some reason, presumably thinking that this would be enough. It's not. `uint32_t` is 32-bit, and you say you have a 64-bit machine. Your pointer type is 64-bit. Use `intptr_t`, just like the accepted answer in the original question says, for the reason it says. – Lightness Races in Orbit Jul 29 '15 at 19:44
  • @LightnessRacesinOrbit sir, I said I tried the solutions mentioned there and it is not working. Then how is it a duplicate ? – adrian008 Jul 29 '15 at 19:48
  • That old link is bad, missing a function pointer is incompatible to void* (and any other non function pointer) –  Jul 29 '15 at 19:51
  • @LightnessRacesinOrbit The *original question* has no accepted answer. – Walter Jul 29 '15 at 20:07
  • @DieterLücking There is no function pointer in this question here. – Walter Jul 29 '15 at 20:07
  • @Walter: Highest scored answer I mean. – Lightness Races in Orbit Jul 29 '15 at 20:14
  • @adrian008: Then you did it wrong. From "it is not working" I cannot tell what you did wrong, except if by "I said I tried the solutions mentioned there" you are referring to the only attempt you've shown us, then your reading skills are suspect because `intptr_t` looks nothing like `uint32_t`. But this _is_ a duplicate. – Lightness Races in Orbit Jul 29 '15 at 20:14

0 Answers0