2016-01-21 70 views
-1

如果你能帮我弄清楚我的静脉问题,我将不胜感激: 我成功安装了静脉4a2和sumo 0.21.0和Omnet 4.4,仿真示例工程精细。网络设置和类“静脉:: ObstacleControl”找不到

接下来,我在工作空间中将Crypto ++ 5.6.3作为C/C++→Existing Code as Makefile Project下的新项目导入。然后我把它挂静脉如下:

  • 在项目引用我选择的加密+在鸟神选项
  • ,我选择链接→写加密+

包括我在我的代码的#include < rsa.h>等等,它被识别并且没有语法错误,但是当我运行模拟(omnet.ini)时,opp_run.exe崩溃。

系统为Windows 10,错误是:

<!> Error in module (cCompoundModule) RSUExampleScenario (id=1) during network setup: Class "Veins::ObstacleControl" not found -- perhaps its code was not linked in, or the class wasn't registered with Register_Class(), or in the case of modules and channels, with Define_Module()/Define_Channel(). 

TRAPPING on the exception above, due to a debug-on-errors=true configuration option. Is your debugger ready? 

Simulation terminated with exit code: -2147483645 
Working directory: C:/Simulateur/veins-4a2/veins-veins-4a2/examples/veins 
Command line: c:/Simulateur/omnetpp-4.4-src-windows/omnetpp-4.4/bin/opp_run.exe -r 0 -n .;../../src/veins --tkenv-image-path=../../images omnetpp.ini 

Environment variables: 
OMNETPP_ROOT=c:/Simulateur/omnetpp-4.4-src-windows/omnetpp-4.4 
PATH=;c:\Simulateur\omnetpp-4.4-src-windows\omnetpp-4.4\bin;c:\Simulateur\omnetpp-4.4-src-windows\omnetpp-4.4\msys\bin;c:\Simulateur\omnetpp-4.4-src-windows\omnetpp-4.4\mingw\bin;c:/Simulateur/omnetpp-4.4-src-windows/omnetpp-4.4/ide/jre/bin/client;c:/Simulateur/omnetpp-4.4-src-windows/omnetpp-4.4/ide/jre/bin;c:/Simulateur/omnetpp-4.4-src-windows/omnetpp-4.4/ide/jre/lib/i386;.;C:\Simulateur\omnetpp-4.4-src-windows\omnetpp-4.4\msys\local\bin;c:\Simulateur\omnetpp-4.4-src-windows\omnetpp-4.4\mingw\bin;C:\Simulateur\omnetpp-4.4-src-windows\omnetpp-4.4\msys\bin;c:\Simulateur\omnetpp-4.4-src-windows\omnetpp-4.4\bin;c:\Windows\system32;c:\Windows;c:\Windows\System32\Wbem;c:\Windows\System32\WindowsPowerShell\v1.0\;c:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;c:\Program Files (x86)\AMD\ATI.ACE\Core-Static;c:\Windows\system32\config\systemprofile\.dnx\bin;c:\Program Files\Microsoft DNX\Dnvm\;c:\Program Files\Microsoft SQL Server\120\Tools\Binn\;c:\Program Files (x86)\Skype\Phone\;c:\Simulateur\omnetpp-4.4-src-windows\omnetpp-4.4; 
OMNETPP_IMAGE_PATH=c:\Simulateur\omnetpp-4.4-src-windows\omnetpp-4.4\images 

问题:如何链接另一个C++库,比如加密+,我的血管项目?

+0

这个问题没有得到好评,因为你描述了你的问题,描述了错误,但你*没有提供相关的代码。 SO的一些成员想要代码,即使是高层次的问题。而且他们甚至批评了什么时候对Omnet ++等技术毫无所知。总是添加一些代码,即使它最小也可能不相关。在你的情况下,我会添加* Network Setup *和* Veins :: ObstacleControl *的代码,因为错误消息将它们命名。 – jww

+0

我没有添加任何代码行,并且我在静态:: ObstacleControl的代码中没有更改任何内容!所有我想做的事情是将一个名为crypto ++的新库C++连接到静脉,并且通过链接它,求和崩溃(opp_run)并在ObstacleControl中发送一个具有讽刺意味的错误,即使我没有碰它! 我的问题它不是编码的问题,而是添加新的C++库的问题,换句话说,如何将另一个C++库链接到我的静脉? –

回答

1

静脉生成其模拟模块的动态库。当使用opp_run时,你需要告诉它加载这个库。否则,仿真将不能实例化任何Veins的模块。

尝试做静脉教程,查看OMNeT ++用来启动模拟的命令行参数。

+0

你的意思是静脉教程第2步中的./configuration?我做到了,但没有任何改变!我不知道该怎么办 ?获取信息:我链接了一个静态库(crypto ++),并且在构建之后,我在src文件夹中有libveins.a和libcryptopp.a。 –

+0

如果可以,请尝试使用动态库。静脉是为该用例而建立的。 –