在Omnet版本omnetpp-5.1pre2-src-windows
上构建Veins(版本:4.4)时,我收到以下错误输出:
**19:58:05 **** Incremental Build of configuration gcc-release for project veins ****
make MODE=release all
make[1]: Entering directory '/c/Users/SIA/Omnet/omnetpp-5.1pre2-src-windows/omnetpp-5.1pre2/samples/veins/src'
veins/base/modules/BaseMacLayer.cc
veins/base/modules/BaseMacLayer.cc:74:29: error: cast from pointer to smaller type 'LAddress::L2Type' (aka 'long') loses information
myMacAddr = LAddress::L2Type(addressString.c_str());
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[1]: *** [Makefile:165: ../out/clang-release/src/veins/base/modules/BaseMacLayer.o] Error 1
make[1]: Leaving directory '/c/Users/SIA/Omnet/omnetpp-5.1pre2-src-windows/omnetpp-5.1pre2/samples/veins/src'
make: *** [Makefile:12: all] Error 2
19:58:08 Build Finished (took 3s.360ms)**
感谢有人可以帮助我。
答案 0 :(得分:2)
虽然,诚然,这也表明代码中存在潜在的不一致性,但Veins 4.4是OMNeT ++ 4.6的模拟模块库。它还与OMNeT ++ 5.0兼容。
您使用的是与Veins不兼容的OMNeT ++版本(5.1预发行版)。
这意味着降级OMNeT ++安装应该可以解决构建错误。
关于http://veins.car2x.org/tutorial/的静脉教程详细介绍了静脉需要安装哪些软件(以及如何)。