Is there any repository for irrNetLite (sourceforge,googlecode)?
If not, do you consider creating one?
Thanks,
Erwin

BlindSide wrote:I can probably give you some kind of a hint if you tell me what the linker errors were.
..\..\..\..\irrNetLite\irrNetLite\lib.a(peer.o):peer.c:(.text+0x597)||undefined reference to `_htonl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(peer.o):peer.c:(.text+0x70b)||undefined reference to `_htonl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(peer.o):peer.c:(.text+0x999)||undefined reference to `_htonl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(peer.o):peer.c:(.text+0xc0b)||undefined reference to `_htonl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(peer.o):peer.c:(.text+0xd6e)||undefined reference to `_htonl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(peer.o):peer.c:(.text+0xe8d)||undefined reference to `_ntohl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(peer.o):peer.c:(.text+0xf32)||undefined reference to `_htonl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(peer.o):peer.c:(.text+0xf7a)||undefined reference to `_htonl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(peer.o):peer.c:(.text+0x1015)||undefined reference to `_htonl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(peer.o):peer.c:(.text+0x1023)||undefined reference to `_htonl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(peer.o):peer.c:(.text+0x1031)||undefined reference to `_htonl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(peer.o):peer.c:(.text+0x12a3)||undefined reference to `_ntohl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0xf3)||undefined reference to `_htonl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0x38c)||undefined reference to `_htonl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0x39d)||undefined reference to `_htonl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0x3ae)||undefined reference to `_htonl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0x675)||undefined reference to `_htonl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0x755)||undefined reference to `_htons@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0x77a)||undefined reference to `_htonl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0xb50)||undefined reference to `_ntohs@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0xb6b)||undefined reference to `_ntohl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0xc63)||undefined reference to `_ntohl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0xcaa)||undefined reference to `_ntohl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0xd61)||undefined reference to `_ntohl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0xd78)||undefined reference to `_ntohl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0xda7)||undefined reference to `_ntohs@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0xdc0)||undefined reference to `_ntohs@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0xdf6)||undefined reference to `_ntohl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0xe28)||undefined reference to `_ntohl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0xe3f)||undefined reference to `_ntohl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0xf19)||undefined reference to `_ntohl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0xf30)||undefined reference to `_ntohl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0x17e4)||undefined reference to `_ntohs@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0x17f6)||undefined reference to `_ntohl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0x1807)||undefined reference to `_ntohl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0x1818)||undefined reference to `_ntohl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0x1829)||undefined reference to `_ntohl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0x183a)||undefined reference to `_ntohl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0x18b6)||undefined reference to `_ntohs@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0x1934)||undefined reference to `_ntohl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0x196f)||undefined reference to `_htons@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0x1985)||undefined reference to `_htons@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0x1994)||undefined reference to `_htonl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0x19a8)||undefined reference to `_htonl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0x19bc)||undefined reference to `_htonl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0x19cf)||undefined reference to `_htonl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0x19e0)||undefined reference to `_htonl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(protocol.o):protocol.c:(.text+0x1b51)||undefined reference to `_ntohl@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(host.o):host.c:(.text+0x318)||undefined reference to `_htons@4'|
..\..\..\..\irrNetLite\irrNetLite\lib.a(host.o):host.c:(.text+0x32e)||undefined reference to `_htons@4'|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build finished: 50 errors, 0 warnings ===|


#include <irrlicht.h>
#include <irrNet.h>
#include <iostream>
using namespace irr;
using namespace std;
class TEClientNetCallback : public net::INetCallback
{
public:
// Our handlePacket function.
virtual void handlePacket(net::SInPacket& packet)
{
// Very simple callback, just echo what the server says.
core::stringc message;
packet >> message;
cout << message.c_str() << endl;
}
};
int initServer()
{
TEClientNetCallback* TEclientCallback = new TEClientNetCallback();
net::INetManager* TEnetManager = net::createIrrNetClient(TEclientCallback, "127.0.0.1");
if(TEnetManager->getConnectionStatus() != net::EICS_FAILED)
{
string message;
message="I send this for the while. Say welcome";
// Send a packet with the message entered.
net::SOutPacket packet;
packet << message;
TEnetManager->sendOutPacket(packet);
}
net::SOutPacket packet;
while(TEnetManager->getConnectionStatus() != net::EICS_FAILED)
{
TEnetManager->update(100);
}
// Clean up.
delete TEnetManager;
delete TEclientCallback;
return 0;
}
int main()
{
initServer();
}
class TEClientNetCallback : public net::INetCallback
{
public:
// Our handlePacket function.
virtual void handlePacket(net::SInPacket& packet)
{
// Very simple callback, just echo what the server says.
std::string message;
packet >> message;
cout << message.c_str() << endl;
}
};


if(mode == ENM_CLIENT)
{
ENetEvent event;
enet_peer_disconnect(peer, 0);
enet_host_service(host, &event, 0);
}
Return to Project Announcements
Users browsing this forum: No registered users and 1 guest