Omnet++:在 Cmdenv 和 Qtenv 中使用相同命令会生成不同的错误

问题描述 投票:0回答:1

我正在编写一个基于Omnet++ 6.0.1和INET 4.4的卫星通信项目。

该项目被其他两个导入的项目引用,文件结构如下图所示: file structure

我首先在 leosatellites/src 中使用 makefile 从其他两个项目创建了一个共享库,然后使用 SatSGP4 中的 omnetpp.ini 文件在调试模式下运行该项目。整个项目可以构建,没有错误或警告,但由于此错误而无法运行模拟:

<!> Error: Cannot load library '../../src//libleosatellites_dbg.so': ../../src//libleosatellites_dbg.so: undefined symbol: igraph_vector_int_list_init

上面的错误是我在 Qtenv 中运行时遇到的错误(这意味着直接在 IDE 中运行)。

最大的问题是,当我尝试使用从以前的 Qtenv 自动生成的命令在 Cmdenv 中运行它时,生成了一个不同的错误:

未找到接受 1 个参数的“firstAvailableOrEmpty”函数,位于 /home/zzz/omnetpp-6.0.1/samples/leosatellites/simulations/SatSGP4/SatSGP4.ned:43,位于 /home/zzz/omnetpp-6.0 .1/samples/leosatellites/simulations/SatSGP4/SatSGP4.ned:43 -- 在模块 (omnetpp::cModule) SatSGP4 (id=1) 中,在网络设置期间

模拟命令为:(Cmdenv 和 Qtenv 相同)

/home/zzz/omnetpp-6.0.1/bin/opp_run_dbg  -m -u Qtenv -c Experiment1 -n ../../src:..:../../../inet4.4/examples:../../../inet4.4/showcases:../../../inet4.4/src:../../../inet4.4/tests/validation:../../../inet4.4/tests/networks:../../../inet4.4/tutorials:../../../os3/simulations:../../../os3/src -x inet.common.selfdoc;inet.linklayer.configurator.gatescheduling.z3;inet.emulation;inet.showcases.visualizer.osg;inet.examples.emulation;inet.showcases.emulation;inet.transportlayer.tcp_lwip;inet.applications.voipstream;inet.visualizer.osg;inet.examples.voipstream --image-path=../../../inet4.4/images:../../../os3/images -l ../../src/leosatellites -l ../../../inet4.4/src/INET -l ../../../os3/src/os3 --debug-on-errors=true omnetpp.ini

我确信所有三个存储库都相互引用。从报错来看,共享库的路径是对的,.so文件也在,但是找不到。

这是我用来生成共享库的命令行:

opp_makemake --make-so -f --deep 
-KINET4_4_PROJ=$HOME/omnetpp-6.0.1/samples/inet4.4
-KOS3_PROJ=$HOME/omnetpp-6.0.1/samples/os3 
-DINET_IMPORT 
'-I/home/zzz/omnetpp-
6.0.1/samples/leosatellites/src/igraph' 
'-I$(OS3_PROJ)/src' '-I$(INET4_4_PROJ)/src' 
'-I/usr/include/x86_64-linux-gnu/curl' 
'-L/usr/lib/x86_64-linux-gnu' 
'-L$(INET4_4_PROJ)/src' '-L$(OS3_PROJ)/src' 
'-ligraph' '-lxml2 -lz' '-lgmp' '-lblas' '-lglpk' '-llapack' '-larpack' '-lINET$(D)' '-los3$(D)'

这个错误花了我一整夜,但我仍然不知道问题出在哪里,有人可以帮助我吗?

c++ simulation omnet++ inet satellite
1个回答
0
投票

你解决这个错误了吗?我现在就遇到这个错误了

© www.soinside.com 2019 - 2024. All rights reserved.