3
votes

I have followed the tutorial steps for installing Veins 4.5 for Windows with sumo 0.29 and Omnet++ 5.1, and everything went fine until the point I had to built Veins inside Omnet++. The only problem I had was related to some Qt packages, which was solved setting the QTENV option to "no" during the Omnet++ install.

When trying to build Veins in Omnet++, I get the following error:

veins/base/modules/BaseMacLayer.cc:74:67: error: cast from 'const char*' to 'LAddress::L2Type {aka long int}' loses precision [-fpermissive]

Searching for what exactly it could be, I found that this it is usually related to 32bits vs. 64bits machine compilation problem. I heard that this error usually appears when compiling the project in a 64bit machine (which is the case of my machine), but not on a 32bit machine. I would like to know if compiling in a 32bit machine is a requirement for Veins usage or if the problem is related to anything else you might know.

1

1 Answers

2
votes

This appears to be a bug in Veins 4.5.

It is triggered by unused code of MiXiM. As a quick work-around, substitute line 74 with the contents of line 72.

Note, though, that Veins 4.5 is not compatible with OMNeT++ 5.1. If using OMNeT++ 5.1 with Veins 4.5 is an absolute must for you, you can find some ideas on the issue tracker and the mailing list.

If you can wait, I would recommend using one of the compatible versions pointed out in the Veins tutorial.