Jump to content

[SOLVED] ftbfs: error: ‘enet_address_get_host_ip’ was not declared in this scope


GunChleoc
 Share

Recommended Posts

Are there any new dependencies that haven't been documented on the wiki yet?

I have Ubuntu 20.04-based Linux Mint. SVN r24660.

I cleaned the workspaces and rebuilt without any parameters.

 

precompiled.cpp
../../../source/network/StunClient.cpp: In function ‘JS::Value StunClient::FindStunEndpointHost(const ScriptInterface&, int)’:
../../../source/network/StunClient.cpp:375:68: error: too many arguments to function ‘ENetHost* enet_host_create(const ENetAddress*, size_t, enet_uint32, enet_uint32)’
  375 |  ENetHost* transactionHost = enet_host_create(&hostAddr, 1, 1, 0, 0);
      |                                                                    ^
In file included from ../../../source/lib/external_libraries/enet.h:48,
                 from ../../../source/network/StunClient.cpp:40:
/usr/local/include/enet/enet.h:405:21: note: declared here
  405 | ENET_API ENetHost * enet_host_create (const ENetAddress *address, size_t peerCount, enet_uint32 incomingBandwidth, enet_uint32 outgoingBandwidth );
      |                     ^~~~~~~~~~~~~~~~
../../../source/network/StunClient.cpp:391:2: error: ‘enet_address_get_host_ip’ was not declared in this scope; did you mean ‘enet_address_get_host’?
  391 |  enet_address_get_host_ip(&addr, ipStr, ARRAY_SIZE(ipStr));
      |  ^~~~~~~~~~~~~~~~~~~~~~~~
      |  enet_address_get_host
../../../source/network/StunClient.cpp: In function ‘bool StunClient::FindStunEndpointJoin(ENetHost&, StunClient::StunEndpoint&)’:
../../../source/network/StunClient.cpp:409:2: error: ‘enet_address_get_host_ip’ was not declared in this scope; did you mean ‘enet_address_get_host’?
  409 |  enet_address_get_host_ip(&addr, ipStr, ARRAY_SIZE(ipStr));
      |  ^~~~~~~~~~~~~~~~~~~~~~~~
      |  enet_address_get_host
../../../source/network/NetSession.cpp: In member function ‘bool CNetClientSession::Connect(const CStr8&, u16, bool, ENetHost*)’:
../../../source/network/NetSession.cpp:69:55: error: too many arguments to function ‘ENetHost* enet_host_create(const ENetAddress*, size_t, enet_uint32, enet_uint32)’
   69 |   host = enet_host_create(NULL, 1, CHANNEL_COUNT, 0, 0);
      |                                                       ^
In file included from ../../../source/lib/external_libraries/enet.h:48,
                 from ../../../source/network/NetSession.h:21,
                 from ../../../source/network/NetSession.cpp:20:
/usr/local/include/enet/enet.h:405:21: note: declared here
  405 | ENET_API ENetHost * enet_host_create (const ENetAddress *address, size_t peerCount, enet_uint32 incomingBandwidth, enet_uint32 outgoingBandwidth );
      |                     ^~~~~~~~~~~~~~~~
../../../source/network/NetSession.cpp:81:66: error: too many arguments to function ‘ENetPeer* enet_host_connect(ENetHost*, const ENetAddress*, size_t)’
   81 |  ENetPeer* peer = enet_host_connect(host, &addr, CHANNEL_COUNT, 0);
      |                                                                  ^
In file included from ../../../source/lib/external_libraries/enet.h:48,
                 from ../../../source/network/NetSession.h:21,
                 from ../../../source/network/NetSession.cpp:20:
/usr/local/include/enet/enet.h:407:21: note: declared here
  407 | ENET_API ENetPeer * enet_host_connect (ENetHost *host, const ENetAddress *address, size_t channelCount );
      |                     ^~~~~~~~~~~~~~~~~
../../../source/network/NetSession.cpp: In member function ‘void CNetClientSession::Poll()’:
../../../source/network/NetSession.cpp:140:3: error: ‘enet_address_get_host_ip’ was not declared in this scope; did you mean ‘enet_address_get_host’?
  140 |   enet_address_get_host_ip(&event.peer->address, hostname, ARRAY_SIZE(hostname));
      |   ^~~~~~~~~~~~~~~~~~~~~~~~
      |   enet_address_get_host
make[1]: *** [network.make:175: obj/network_Release/StunClient.o] Error 1
make[1]: *** Waiting for unfinished jobs....
../../../source/network/NetServer.cpp: In member function ‘bool CNetServerWorker::SetupConnection(u16)’:
../../../source/network/NetServer.cpp:195:67: error: too many arguments to function ‘ENetHost* enet_host_create(const ENetAddress*, size_t, enet_uint32, enet_uint32)’
  195 |  m_Host = enet_host_create(&addr, MAX_CLIENTS, CHANNEL_COUNT, 0, 0);
      |                                                                   ^
In file included from ../../../source/lib/external_libraries/enet.h:48,
                 from ../../../source/network/NetSession.h:21,
                 from ../../../source/network/NetServer.cpp:24:
/usr/local/include/enet/enet.h:405:21: note: declared here
  405 | ENET_API ENetHost * enet_host_create (const ENetAddress *address, size_t peerCount, enet_uint32 incomingBandwidth, enet_uint32 outgoingBandwidth );
      |                     ^~~~~~~~~~~~~~~~
../../../source/network/NetServer.cpp: In member function ‘bool CNetServerWorker::RunStep()’:
../../../source/network/NetServer.cpp:493:3: error: ‘enet_address_get_host_ip’ was not declared in this scope; did you mean ‘enet_address_get_host’?
  493 |   enet_address_get_host_ip(&event.peer->address, hostname, ARRAY_SIZE(hostname));
      |   ^~~~~~~~~~~~~~~~~~~~~~~~
      |   enet_address_get_host

 

Edited by GunChleoc
  • Thanks 1
Link to comment
Share on other sites

  • GunChleoc changed the title to [SOLVED] ftbfs: error: ‘enet_address_get_host_ip’ was not declared in this scope
  • 4 weeks later...

I have now found out where my 2 enet versions are coming from: I am also translating the Enigma game, which uses an older version of enet.

I don't know how the 0AD build system works; @wraitii would it be possible/worth the effort to look for the system enet before the usr/local enet, or to specify a minimum version and skip the usr/local match?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...