debugging 无法调试INET示例,libINET_dbg. dll不是有效的win32应用程序错误

wlp8pajw  于 2023-08-06  发布在  其他
关注(0)|答案(1)|浏览(186)

我是一名学生,我使用OMNET和INET框架作为我的项目的一部分。我试图调试一些tsn INET展示来理解流程,但在启动过程中我得到了一个“libINET_dbg.dll不是有效的win 32应用程序错误”。在Windows(64)上使用最新的OMNET版本(6. 0. 1)和INET(4. 5),我现在已经多次尝试重新安装OMNET和INET,但得到同样的错误。
OMNeT++ Discrete Event Simulation (C) 1992-2022 Andras Varga, OpenSim Ltd. Version: 6.0.1, build: 220831-e4f07d04b8, edition: Academic Public License -- NOT FOR COMMERCIAL USE See the license for distribution terms and warranty disclaimer <!> Error: Cannot load library '../../../src//libINET_dbg.dll': %1 is not a valid Win32 application End.
A:\omnetpp-6.0.1-windows-x86_64\omnetpp-6.0.1\samples\inet4.5\s rc\libINET_dbg.dll is either not designed to run on Windows or it contains an error. Try installing the program again using the original installation media or contact your system administrator or the software vendor for sport. Error status 0xc000007b
我所做的:

  • 下载并解压缩OMNET++ 6.0.1 for Windows
  • 编辑configure.user,PREFER_CLANG=no以使用gcc/g++并运行./configure和make
  • 通过IDE安装INET 4.5。
  • 在Path中添加了这些内容并进行调试构建
A:\omnetpp-6.0.1-windows-x86_64\omnetpp-6.0.1\tools\win32.x86_64\mingw64\bin

A:\omnetpp-6.0.1-windows-x86_64\omnetpp-6.0.1\bin

A:\omnetpp-6.0.1-windows-x86_64\omnetpp-6.0.1\samples\inet4.5\src 

A:\omnetpp-6.0.1-windows-x86_64\omnetpp-6.0.1\lib

字符串

  • 后来,我也做了,make cleanall,source setenv,make makefile和make。但错误存在
  • 正如评论中所建议的,我检查了以下内容

/a/omnetpp-6.0.1-windows-x86_64/omnetpp-6.0.1/samples/inet4.5/src$文件libINET_dbg.dll

libINET_dbg.dll: PE32+ executable (DLL) (GUI) x86-64, for MS Windows


/a/omnetpp-6.0.1-windows-x86_64/omnetpp-6.0.1/samples/inet4.5/src$ldd libINET_dbg.dll

ntdll.dll => /c/WINDOWS/SYSTEM32/ntdll.dll (0x7ffd28c50000)
KERNEL32.DLL => /c/WINDOWS/System32/KERNEL32.DLL (0x7ffd281e0000)
KERNELBASE.dll => /c/WINDOWS/System32/KERNELBASE.dll (0x7ffd263e0000)
msvcrt.dll => /c/WINDOWS/System32/msvcrt.dll (0x7ffd28810000)


救命啊!我被卡住了任何信息都会有帮助。先谢谢你了
这是我在这里的第一个问题,请原谅我写作中的错误:)

qltillow

qltillow1#

看起来你的libINET_dbg.dll既没有链接到C++库,也没有链接到OMNeT++库。
ldd libINET_dbg.dll的预期结果如下:

$ ldd libINET_dbg.dll  
    ntdll.dll => /c/WINDOWS/SYSTEM32/ntdll.dll (0x7ffdb9450000)
    KERNEL32.DLL => /c/WINDOWS/System32/KERNEL32.DLL (0x7ffdb91d0000)
    KERNELBASE.dll => /c/WINDOWS/System32/KERNELBASE.dll (0x7ffdb6ce0000)
    msvcrt.dll => /c/WINDOWS/System32/msvcrt.dll (0x7ffdb75f0000)
    WS2_32.dll => /c/WINDOWS/System32/WS2_32.dll (0x7ffdb8be0000)
    RPCRT4.dll => /c/WINDOWS/System32/RPCRT4.dll (0x7ffdb90a0000)
    libgcc_s_seh-1.dll => /mingw64/bin/libgcc_s_seh-1.dll (0x7ffdb1b20000)
    libstdc++-6.dll => /mingw64/bin/libstdc++-6.dll (0x7ffd6ea20000)
    libwinpthread-1.dll => /opt/mingw64/bin/libwinpthread-1.dll (0x64940000)
    libwinpthread-1.dll => /opt/mingw64/bin/libwinpthread-1.dll (0xa0000)
    liboppsim_dbg.dll => /c/omnetpp/omnetpp-6.0.1/bin/liboppsim_dbg.dll (0x7ffce69f0000)
    liboppnedxml_dbg.dll => /c/omnetpp/omnetpp-6.0.1/bin/liboppnedxml_dbg.dll (0x7ffce5fd0000)
    liboppcommon_dbg.dll => /c/omnetpp/omnetpp-6.0.1/bin/liboppcommon_dbg.dll (0x7ffce56b0000)

字符串
我强烈建议不要添加任何路径到Windows PATH变量-OMNeT++ for Windows使用MinGW生态系统,所有必要的路径已经添加。

相关问题