简体   繁体   English

静脉Omnet ++构建错误

[英]Veins Omnet++ building error

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++. 我已经按照教程步骤在Sumo 0.29和Omnet ++ 5.1上为Windows安装了Veins 4.5,一切都进行得很好,直到我不得不在Omnet ++中构建Veins为止。 The only problem I had was related to some Qt packages, which was solved setting the QTENV option to "no" during the Omnet++ install. 我唯一遇到的问题与某些Qt软件包有关,在安装Omnet ++的过程中将QTENV选项设置为“ no”即可解决。

When trying to build Veins in Omnet++, I get the following error: 尝试在Omnet ++中构建静脉时,出现以下错误:

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. 搜索确切的内容后,我发现这通常与32位与64位机器编译问题有关。 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. 我听说在64位计算机上(在我的计算机上)编译项目时通常会出现此错误,而在32位计算机上则不是。 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. 我想知道是否需要使用32位计算机进行编译,或者是否与您可能知道的其他问题有关。

This appears to be a bug in Veins 4.5. 这似乎是Veins 4.5中的错误。

It is triggered by unused code of MiXiM. 它由MiXiM的未使用代码触发。 As a quick work-around, substitute line 74 with the contents of line 72 . 作为快速的变通,替代线74与内容线72

Note, though, that Veins 4.5 is not compatible with OMNeT++ 5.1. 但是请注意,静脉4.5与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 . 如果绝对需要将OMNeT ++ 5.1与Veins 4.5一起使用,则可以在问题跟踪器邮件列表中找到一些想法。

If you can wait, I would recommend using one of the compatible versions pointed out in the Veins tutorial. 如果您可以等待,我建议您使用Veins教程中指出的兼容版本之一。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM