lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] Problem Running LWIP Simulation on OMNET++


From: Benjamin Bosch
Subject: [lwip-devel] Problem Running LWIP Simulation on OMNET++
Date: Tue, 20 Jul 2021 16:58:00 -0500

My name is Benjamin Bosch. I am currently pursuing my masters degree in electrical and computer engineering through the Cape Peninsula University of Technology located in Cape town, South Africa. 
I am trying to run a lwIP simulation in OMNET++.
I am still trying to run the following simulation in Omnet 5.6.1 (using INET 4.2.5) inet/examples/inet/nclients/omnetpp.ini.
When I build INET without TCP (lwIP) checkbox checked in the Project Features window I get a clean build. If I check the checkbox I get the following 26 errors:

inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:47:9: error: expected ';' at end of declaration list
  u32_t s_addr;

inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:69:7: error: functions that differ only in their return type cannot be overloaded
u32_t inet_addr(const char *cp);

inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:69:7: warning: 'inet_addr' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
u32_t inet_addr(const char *cp);

inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:47:9: error: expected ';' at end of declaration list
  u32_t s_addr;

inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:69:7: error: functions that differ only in their return type cannot be overloaded
u32_t inet_addr(const char *cp);

inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:69:7: warning: 'inet_addr' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
u32_t inet_addr(const char *cp);

inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:71:7: error: conflicting types for 'inet_ntoa'
char *inet_ntoa(struct in_addr addr); /* returns ptr to static buffer; not reentrant! */

inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:71:7: warning: 'inet_ntoa' redeclared without 'dllimport' attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
char *inet_ntoa(struct in_addr addr); /* returns ptr to static buffer; not reentrant! */

inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:47:9: error: expected ';' at end of declaration list
  u32_t s_addr;

inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:71:7: error: conflicting types for 'inet_ntoa'
char *inet_ntoa(struct in_addr addr); /* returns ptr to static buffer; not reentrant! */

inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:69:7: error: functions that differ only in their return type cannot be overloaded
u32_t inet_addr(const char *cp);

::38: C:\OMNET\omnetpp561\omnetpp-5.6.1\tools\win64\mingw64\x86_64-w64-mingw32\include\winnt.h  WINSOCK_API_LINKAGE unsigned __LONG32 WSAAPI inet_addr(const char *cp);:

C:\OMNET\omnetpp561\omnetpp-5.6.1\tools\win64\mingw64\x86_64-w64-mingw32\include\winnt.h:147:37:   WINSOCK_API_LINKAGE u_short WSAAPI htons(u_short hostshort);52

^inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h
:111:7: error: functions that differ only in their return type cannot be overloaded
u32_t htonl(u32_t x);

In file included from inet/transportlayer/tcp_lwip/lwip/include\lwip/lwip_tcp.hC:\OMNET\omnetpp561\omnetpp-5.6.1\tools\win64\mingw64\x86_64-w64-mingw32\include\winnt.hinet/transportlayer/tcp_lwip/lwip/include\lwip/lwip_tcp.h::52:  WINSOCK_API_LINKAGE unsigned __LONG32 WSAAPI inet_addr(const char *cp);147:
:In file included from 
37                                               ^inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/lwip_ip.h

inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:112:7: error: functions that differ only in their return type cannot be overloaded
u32_t ntohl(u32_t x);

inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:71:7: error: conflicting types for 'inet_ntoa'
char *inet_ntoa(struct in_addr addr); /* returns ptr to static buffer; not reentrant! */

inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:111:7: error: functions that differ only in their return type cannot be overloaded
u32_t htonl(u32_t x);

In file included from inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/lwip_ip.h::112:7: error: functions that differ only in their return type cannot be overloaded
u32_t ntohl(u32_t x);

inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:112:7: error: functions that differ only in their return type cannot be overloaded
u32_t ntohl(u32_t x);

119:9: C:\OMNET\omnetpp561\omnetpp-5.6.1\tools\win64\mingw64\x86_64-w64-mingw32\include\winsock2.hwarning:: 'IN_CLASSB_HOST' macro redefined [-Wmacro-redefined]
#define IN_CLASSB_HOST      (0xffffffff & ~IN_CLASSB_NET)

inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:111:7: error: functions that differ only in their return type cannot be overloaded
u32_t htonl(u32_t x);

In file included from inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/ip_addr.h:37:
inet/transportlayer/tcp_lwip/lwip/include/ipv4\lwip/inet.h:112:7: error: functions that differ only in their return type cannot be overloaded
u32_t ntohl(u32_t x);

9 warnings and 5 errors generated.
9 warnings and 5 errors generated.
make[1]: *** [Makefile:1762: ../out/clang-debug/src/inet/transportlayer/tcp_lwip/LwipTcpLayer.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:1762: ../out/clang-debug/src/inet/transportlayer/tcp_lwip/lwip/core/memp.o] Error 1
9 warnings and 5 errors generated.
make[1]: *** [Makefile:1762: ../out/clang-debug/src/inet/transportlayer/tcp_lwip/TcpLwipConnection.o] Error 1
9 warnings and 5 errors generated.
make[1]: *** [Makefile:1762: ../out/clang-debug/src/inet/transportlayer/tcp_lwip/TcpLwip.o] Error 1
make[1]: Leaving directory '/c/OMNET/omnetpp561/inet4/src'
make: *** [Makefile:7: all] Error 2
"make MODE=debug -j4 all" terminated with exit code 2. Build might be incomplete.

When I try to run the simulation I get the following error:

<!> Error: Cannot load library '../../../src//libINET.dll': The specified module could not be found

End.

Simulation terminated with exit code: 1
Working directory: C:/OMNET/omnetpp561/inet4/examples/inet/nclients
Command line: ../../../../../../Pakhuis/Akademie/MEng/Thesis/Simulasie/WorkSpaces/ThesisSimulations/ThesisSimulations/src/ThesisSimulations.exe -m -n ../../../src;../..;../../../tutorials;../../../showcases --image-path=../../../images -l ../../../src/INET omnetpp.ini

<!> Error: Cannot load library '../../../src//libINET.dll': The specified module could not be found

End.

Simulation terminated with exit code: 1
Working directory: C:/OMNET/omnetpp561/inet4/examples/inet/nclients
Command line: ../../../../../../Pakhuis/Akademie/MEng/Thesis/Simulasie/WorkSpaces/ThesisSimulations/ThesisSimulations/src/ThesisSimulations.exe -m -n ../../../src;../..;../../../tutorials;../../../showcases --image-path=../../../images -l ../../../src/INET omnetpp.ini

Environment variables:
PATH=;C:/OMNET/omnetpp561/inet4/src;C:\OMNET\omnetpp561\omnetpp-5.6.1\bin;C:\OMNET\omnetpp561\omnetpp-5.6.1\tools\win64\mingw64\bin;C:\OMNET\omnetpp561\omnetpp-5.6.1\tools\win64\usr\bin;;C:/OMNET/omnetpp561/omnetpp-5.6.1/ide/jre/bin/server;C:/OMNET/omnetpp561/omnetpp-5.6.1/ide/jre/bin;C:/OMNET/omnetpp561/omnetpp-5.6.1/ide/jre/lib/amd64;.;C:\OMNET\omnetpp561\omnetpp-5.6.1\bin;C:\OMNET\omnetpp561\omnetpp-5.6.1\tools\win64\mingw64\bin;C:\OMNET\omnetpp561\omnetpp-5.6.1\tools\win64\usr\local\bin;C:\OMNET\omnetpp561\omnetpp-5.6.1\tools\win64\usr\bin;C:\OMNET\omnetpp561\omnetpp-5.6.1\tools\win64\usr\bin;C:\Windows\System32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\OMNET\omnetpp561\omnetpp-5.6.1\tools\win64\usr\bin\site_perl;C:\OMNET\omnetpp561\omnetpp-5.6.1\tools\win64\usr\bin\vendor_perl;C:\OMNET\omnetpp561\omnetpp-5.6.1\tools\win64\usr\bin\core_perl;C:\OMNET\omnetpp561\omnetpp-5.6.1;
OMNETPP_ROOT=C:/OMNET/omnetpp561/omnetpp-5.6.1/
OMNETPP_IMAGE_PATH=C:\OMNET\omnetpp561\omnetpp-5.6.1\images

I futher noticed that in OMNET++ the inet/src/inet/transportlayer/tcp_lwip/lwip/include/ipv4/iwip/inet.h reports a fault and the
inet/src/inet/transportlayer/tcp_lwip/lwip/include/ipv4/iwip/ip_addr.h reports some warnings.

I have tried reinstalling OMNET++ and using other INET versions. I also tried using OMNET 4.2.2 with no success as the above-mentioned error persists.

Can you please advise me on how I can fix these errors in order to run the lwIP simulation? 

Kind regards
Benjamin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]