【发布时间】:2016-01-21 17:02:47
【问题描述】:
如果您能帮我找出我的静脉问题,我将不胜感激: 我成功安装了静脉 4a2 和 sumo 0.21.0 和 Omnet 4.4 ,模拟示例运行良好。
接下来,我在工作区中导入 Crypto++ 5.6.3 作为 C/C++ → Existing Code as Makefile Project 下的新项目。然后我将其链接到静脉如下:
- 在项目参考中我选择了 Crypto++
- 在 Makemake 选项中,我选择 Link → 并编写 Crypto++
我在我的代码中包含#include
系统是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++ 库(如 Crypto++)链接到我的静脉项目?
【问题讨论】:
-
这个问题没有得到很好的接受,因为您描述了您的问题,描述了错误,但您没有提供相关代码。 SO的一些成员想要代码,即使是高级问题。他们甚至批评不了解该技术的人,例如 Omnet++。总是添加一些代码,即使它是最小的并且可能无关紧要。在您的情况下,我会为 Network Setup 和 Veins::ObstacleControl 添加代码,因为错误消息命名了它们。
-
我没有添加任何代码行,也没有更改 Veins::ObstacleControl 的代码中的任何内容!我要做的就是将一个名为 crypto++ 的新库 c++ 连接到静脉,并通过链接它,求和崩溃 (opp_run) 并在 ObstacleControl 中发送一个具有讽刺意味的错误,即使我没有碰它!我的问题不是编码问题,而是添加新 c++ 库的问题,换句话说,如何将另一个 c++ 库链接到我的血管?!
标签: windows linker crypto++ omnet++ veins