irrNetLite 2.1 [BETA]

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki

Re: irrNetLite 2.1 [BETA]

Postby Oster200 » Wed Jul 31, 2013 5:16 pm

serengeor wrote:
Oster200 wrote:How do i make this work for in C::B that is my only question right now?

Just like any other library. Recompile, link in correct order.


Yes im new to C::B So i dont really know what i have to recompile and than to link in correct order im guessing would be Irrlicht than irrNetLite.

If i could have instructions

thanks

The only files in source are a makefile and i dont know what to do with a makefile. There is no .cbp file either so....
Oster200
 
Posts: 60
Joined: Sun May 06, 2012 6:13 pm

Re: irrNetLite 2.1 [BETA]

Postby Oster200 » Thu Aug 01, 2013 5:52 pm

Well someone here need to know how to make this work with code blocks this is what i tried.

Since i dont know how to recompile this lib i just went and clicked project->build options->search directories and under compiler added irrnetlite/source and i also added irrnetlite include.
i tried to build it and got these errors
cpp Code: Select all
||=== net test, Debug ===|
obj\Debug\main.o||In function `main':|
C:\Users\user\Documents\CodeBlocksProjects\net test\main.cpp|160|undefined reference to `irr::net::createIrrNetServer(irr::net::INetCallback*, unsigned int, irr::net::SNetParams const&)'
|
C:\Users\user\Documents\CodeBlocksProjects\net test\main.cpp|179|undefined reference to `irr::net::createIrrNetClient(irr::net::INetCallback*, char const*, unsigned int, irr::net::SNetParams const&)'|
C:\Users\user\Documents\CodeBlocksProjects\net test\main.cpp|197|undefined reference to `irr::net::SOutPacket::SOutPacket()'
|
C:\Users\user\Documents\CodeBlocksProjects\net test\main.cpp|198|undefined reference to `irr::net::SOutPacket::operator<<(char)'|
C:\Users\user\Documents\CodeBlocksProjects\net test\main.cpp|204|undefined reference to `irr::net::SOutPacket::operator<<(float)'
|
C:\Users\user\Documents\CodeBlocksProjects\net test\main.cpp|211|undefined reference to `irr::net::SOutPacket::SOutPacket()'|
C:\Users\user\Documents\CodeBlocksProjects\net test\main.cpp|212|undefined reference to `irr::net::SOutPacket::operator<<(char)'
|
C:\Users\user\Documents\CodeBlocksProjects\net test\main.cpp|217|undefined reference to `irr::net::SOutPacket::operator<<(float)'|
C:\Users\user\Documents\CodeBlocksProjects\net test\main.cpp|224|undefined reference to `irr::net::SOutPacket::SOutPacket()'
|
C:\Users\user\Documents\CodeBlocksProjects\net test\main.cpp|225|undefined reference to `irr::net::SOutPacket::operator<<(char)'|
C:\Users\user\Documents\CodeBlocksProjects\net test\main.cpp|230|undefined reference to `irr::net::SOutPacket::operator<<(char const*)'
|
obj\Debug\main.o||In function `ZN17ServerNetCallback12handlePacketERN3irr3net9SInPacketE':|
C:\Users\user\Documents\CodeBlocksProjects\net test\main.cpp|67|undefined reference to `irr::net::SInPacket::operator>>(char&)'
|
C:\Users\user\Documents\CodeBlocksProjects\net test\main.cpp|74|undefined reference to `irr::net::SInPacket::operator>>(float&)'|
C:\Users\user\Documents\CodeBlocksProjects\net test\main.cpp|79|undefined reference to `irr::net::SInPacket::operator>>(float&)'
|
C:\Users\user\Documents\CodeBlocksProjects\net test\main.cpp|87|undefined reference to `irr::net::SInPacket::operator>>(irr::core::string<char, irr::core::irrAllocator<char> >&)'|
C:\Users\user\Documents\CodeBlocksProjects\net test\main.cpp|92|undefined reference to `irr::net::SInPacket::getPlayerId() const'
|
C:\Users\user\Documents\CodeBlocksProjects\net test\main.cpp|98|undefined reference to `irr::net::SOutPacket::SOutPacket()'|
C:\Users\user\Documents\CodeBlocksProjects\net test\main.cpp|103|undefined reference to `irr::net::SOutPacket::operator<<(char)'
|
C:\Users\user\Documents\CodeBlocksProjects\net test\main.cpp|104|undefined reference to `irr::net::SOutPacket::operator<<(float)'|
C:\Users\user\Documents\CodeBlocksProjects\net test\main.cpp|110|undefined reference to `irr::net::SOutPacket::SOutPacket()'
|
C:\Users\user\Documents\CodeBlocksProjects\net test\main.cpp|111|undefined reference to `irr::net::SOutPacket::operator<<(char)'|
C:\Users\user\Documents\CodeBlocksProjects\net test\main.cpp|112|undefined reference to `irr::net::SOutPacket::operator<<(float)'
|
obj\Debug\main.o||In function `ZN17ClientNetCallback12handlePacketERN3irr3net9SInPacketE':|
C:\Users\user\Documents\CodeBlocksProjects\net test\main.cpp|128|undefined reference to `irr::net::SInPacket::operator>>(char&)'
|
C:\Users\user\Documents\CodeBlocksProjects\net test\main.cpp|134|undefined reference to `irr::net::SInPacket::operator>>(float&)'|
C:\Users\user\Documents\CodeBlocksProjects\net test\main.cpp|139|undefined reference to `irr::net::SInPacket::operator>>(float&)'
|
||=== Build finished: 25 errors, 0 warnings (0 minutes, 0 seconds) ===|
 


BTW i dont have irrlicht linked to this project because it says it dosent need to be. What do these mean and how to fix or am i just no doing this right because i never recompiled it. I dont know how
Oster200
 
Posts: 60
Joined: Sun May 06, 2012 6:13 pm

Re: irrNetLite 2.1 [BETA]

Postby zerochen » Mon Aug 05, 2013 10:17 pm

you have to add the irrnetlite lib as well
zerochen
 
Posts: 273
Joined: Wed Jan 07, 2009 1:17 am
Location: Germany

Re: irrNetLite 2.1 [BETA]

Postby Oster200 » Tue Aug 06, 2013 10:38 pm

zerochen wrote:you have to add the irrnetlite lib as well

That did not work, maybe i should be explaining this better because i dont think i was doing very well at it before.

1. I first created a Console application in c::b
2. I went to project->build options->linker and i added the irrnetlite.lib ( this could be my problem since it is in the folder lib/msvc and i am not using msvc
3. I click on search directories and added everything in the include and source folder I also added all these under debug because that was the default it changes sometimes though.
4. Ran the default hello world code. and it works but when i added the tutorial code it dint see below.

Now if i did something wrong already you might as well stop reading because below this is when i copy the code from the tutorial cpp file.

5. selected code from the tutorial file

cpp Code: Select all
#include <iostream>
#include <irrNet.h>
 
using namespace std;
using namespace irr;
 
class MyNetCallback : public net::INetCallback
{
public:
    virtual void handlePacket(net::SInPacket& packet)
    {
        // irrNetLite encryption is very easy to use! Just pass
        // a 16-byte (128-bit) string to encryptPacket/decryptPacket
        // to encrypt/decrypt a packet respectively. Do not try to
        // decrypt an un-encrypted packet or read from an encrypted
        // packet without decrypting it first or bad things will happen!
        packet.decryptPacket("hushthisissecret");
 
        // irrNetLite compression is even easier! The ZLib library is used
        // here, just call compressPacket/decompressPacket to
        // compress/decompress a packet. Again, do not try to decompress
        // an un-compressed packet or read from a compressed packet without
        // decompressing it! Another thing to keep in mind is that you should
        // decompress and decrypt in the correct order. If you compressed a file
        // and then encrypted it when it was sent, you must decrypt it first
        // before trying to decompress it, same goes for the other order.
        packet.deCompressPacket();
 
        // Extracting info from a received packet is simple. You can treat
        // the packet as an input stream, the >> operator is overloaded
        // and works for most built in types. The string class in irrNetLite
        // is a custom implementation not unlike the std::string. You can
        // also send and receive strings as "char*". Note that the "char*"
        // and stringc are interchangeable, you can send a stringc and
        // receive a char*, or vice-versa.
        core::stringc str;
        packet >> str;
 
        // Support for a simple 3-dimensional vector class is there too. Both
        // vector3df and core::stringc are borrowed from Irrlicht and included
        // here for convenience.
        core::vector3df vec;
        packet >> vec;
 
        // Here we are obtaining the last value from the packet. f32 is just a
        // typedef for float.
        f32 height;
        packet >> height;
 
        // Print the values to the console.
        std::cout << "Message: " << str.c_str();
        std::cout << " Position: " << vec.X << " " << vec.Y << " " << vec.Z;
        std::cout << " Height: " << height << " ft";
        std::cout << std::endl;
    }
};
 
int main()
{
    // Ask the user whether they want to be the server or a client.
    std::cout << "Client (c) or Server (s)?";
    char i;
    std::cin >> i;
 
    // If they typed 's' they are the server else they are the client.
    if(i == 's')
    {
        // Create a server and pass in a new instance of our callback class. The default
        // port that clients can connect to is set to 45000.
        MyNetCallback* netCallback = new MyNetCallback();
        net::INetManager* netManager = net::createIrrNetServer(netCallback);
 
        // Setting verbose to true makes irrNetLite spit out debug information to the console.
        netManager->setVerbose(true);
 
        // While the connection is active (Not failed), we update the netManager.
        // Note that since this is a server the connection will pretty much always
        // be flagged as active, unless some error occured whilst creating the server.
        // A value of 1000 is passed to update to make it hang for a second and wait for
        // packets to arrive. (Recommended for servers, so you don't busy-loop).
        while(netManager->getConnectionStatus() != net::EICS_FAILED)
            netManager->update(1000);
 
        // Don't forget to clean up!
        delete netManager;
        delete netCallback;
    }
    else
    {
        // Create an irrNet client, in this example we will just connect to the localhost
        // address ("127.0.0.1"), which basically means we are connecting to the same
        // computer the client is on. Note that we just pass a value of 0 as our
        // INetCallback, because the client in this example does no need to handle any
        // packets. You can safely pass a value of 0 if this is the case.
        net::INetManager* netManager = net::createIrrNetClient(0, "127.0.0.1");
 
        // Enable debug messages.
        netManager->setVerbose(true);
 
        // Here comes the fun part, while the client is connected we update the netManager
        // and ask it to wait 1 second (1000 milliseconds) for new packets to arrive before
        // returning. Since the client in this example doesn't actually receive any packets,
        // the only purpose of the update call is to leave a 1 second interval between each
        // packet we send.
        while(netManager->getConnectionStatus() != net::EICS_FAILED)
        {
            netManager->update(1000);
 
            // To send a packet, first you create an SOutPacket object.
            net::SOutPacket packet;
 
            // Then you can use the streaming operator << to add new data to it.
            packet << "Help I am stuck on a mountain!";
 
            // You can even chain the << operators like so, just like with ostream.
            packet << core::vector3df(50.0f, 30.0f, 20.0f) << 50.0f;
 
            // Compress the packet, not much to be said.
            packet.compressPacket();
 
            // Encrypt the packet. Note that here we are just using a simple key
            // that is shared among the client and the server. In more sophisticated
            // implementations you may want to generate a random key on the server for
            // each client and send that using a shared key, then use the new key for
            // further communication. Remember that the key should be 16 characters
            // long, and obviously the client and server must share the same key.
            packet.encryptPacket("hushthisissecret");
 
            // A simple call to "sendOutPacket" will send the packet to the server.
            netManager->sendOutPacket(packet);
        }
 
        // When the connection disconnects (Or fails), the loop will terminate.
        // Remember to delete the netManager so that all the low level networking
        // stuff is cleaned up properly.
        delete netManager;
    }
 
    // And we're done, return 0 and make like a tree.
    return 0;
}
 


6. built and got these errors
cpp Code: Select all
obj\Debug\main.o||In function `main':|
C:\Users\user\Documents\CodeBlocksProjects\irrnet\main.cpp|71|undefined reference to `irr::net::createIrrNetServer(irr::net::INetCallback*, unsigned int, irr::net::SNetParams const&)'
|
C:\Users\user\Documents\CodeBlocksProjects\irrnet\main.cpp|95|undefined reference to `irr::net::createIrrNetClient(irr::net::INetCallback*, char const*, unsigned int, irr::net::SNetParams const&)'|
C:\Users\user\Documents\CodeBlocksProjects\irrnet\main.cpp|110|undefined reference to `irr::net::SOutPacket::SOutPacket()'
|
C:\Users\user\Documents\CodeBlocksProjects\irrnet\main.cpp|113|undefined reference to `irr::net::SOutPacket::operator<<(char const*)'|
C:\Users\user\Documents\CodeBlocksProjects\irrnet\main.cpp|116|undefined reference to `irr::net::SOutPacket::operator<<(irr::core::vector3d<float> const&)'
|
C:\Users\user\Documents\CodeBlocksProjects\irrnet\main.cpp|116|undefined reference to `irr::net::SOutPacket::operator<<(float)'|
C:\Users\user\Documents\CodeBlocksProjects\irrnet\main.cpp|119|undefined reference to `irr::net::SOutPacket::compressPacket()'
|
C:\Users\user\Documents\CodeBlocksProjects\irrnet\main.cpp|127|undefined reference to `irr::net::SOutPacket::encryptPacket(char const*)'|
obj\Debug\main.o||In function `ZN13MyNetCallback12handlePacketERN3irr3net9SInPacketE'
:|
C:\Users\user\Documents\CodeBlocksProjects\irrnet\main.cpp|17|undefined reference to `irr::net::SInPacket::decryptPacket(char const*)'|
C:\Users\user\Documents\CodeBlocksProjects\irrnet\main.cpp|27|undefined reference to `irr::net::SInPacket::deCompressPacket()'
|
C:\Users\user\Documents\CodeBlocksProjects\irrnet\main.cpp|37|undefined reference to `irr::net::SInPacket::operator>>(irr::core::string<char, irr::core::irrAllocator<char> >&)'|
C:\Users\user\Documents\CodeBlocksProjects\irrnet\main.cpp|43|undefined reference to `irr::net::SInPacket::operator>>(irr::core::vector3d<float>&)'
|
C:\Users\user\Documents\CodeBlocksProjects\irrnet\main.cpp|48|undefined reference to `irr::net::SInPacket::operator>>(float&)'|
||=== Build finished: 13 errors, 0 warnings (0 minutes, 0 seconds) ===|


7. I thought i might as well try to add the files in the source folder so i right clicked my project and clicked add files recursively selected the source folder and clicked ok, then i clicked 'select all files' in the check box which ended up adding files. clicked ok and added them all to both debug and release. I got these errors
cpp Code: Select all
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\host.o||In function `enet_host_create':|
C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\host.c|29|multiple definition of `enet_host_create'
|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\host.o:C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\host.c|29|first defined here|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\host.o||In function `enet_host_destroy':|
C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\host.c|85|multiple definition of `enet_host_destroy'
|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\host.o:C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\host.c|85|first defined here|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\host.o||In function `enet_host_connect':|
C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\host.c|111|multiple definition of `enet_host_connect'
|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\host.o:C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\host.c|111|first defined here|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\host.o||In function `enet_host_broadcast':|
C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\host.c|191|multiple definition of `enet_host_broadcast'
|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\host.o:C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\host.c|191|first defined here|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\host.o||In function `enet_host_bandwidth_limit':|
C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\host.c|217|multiple definition of `enet_host_bandwidth_limit'
|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\host.o:C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\host.c|217|first defined here|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\host.o||In function `enet_host_bandwidth_throttle':|
C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\host.c|225|multiple definition of `enet_host_bandwidth_throttle'
|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\host.o:C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\host.c|225|first defined here|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\list.o||In function `enet_list_clear':|
C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\list.c|15|multiple definition of `enet_list_clear'
|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\list.o:C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\list.c|15|first defined here|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\list.o||In function `enet_list_insert':|
C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\list.c|22|multiple definition of `enet_list_insert'
|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\list.o:C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\list.c|22|first defined here|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\list.o||In function `enet_list_remove':|
C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\list.c|36|multiple definition of `enet_list_remove'
|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\list.o:C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\list.c|36|first defined here|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\list.o||In function `enet_list_size':|
C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\list.c|45|multiple definition of `enet_list_size'
|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\list.o:C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\list.c|45|first defined here|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\memory.o||In function `enet_malloc':|
C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\memory.c|11|multiple definition of `enet_malloc'
|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\memory.o:C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\memory.c|11|first defined here|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\memory.o||In function `enet_realloc':|
C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\memory.c|22|multiple definition of `enet_realloc'
|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\memory.o:C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\memory.c|22|first defined here|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\memory.o||In function `enet_calloc':|
C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\memory.c|34|multiple definition of `enet_calloc'
|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\memory.o:C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\memory.c|34|first defined here|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\memory.o||In function `enet_free':|
C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\memory.c|45|multiple definition of `enet_free'
|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\memory.o:C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\memory.c|45|first defined here|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\packet.o||In function `enet_packet_create':|
C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\packet.c|22|multiple definition of `enet_packet_create'
|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\packet.o:C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\packet.c|22|first defined here|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\packet.o||In function `enet_packet_destroy':|
C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\packet.c|42|multiple definition of `enet_packet_destroy'
|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\packet.o:C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\packet.c|42|first defined here|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\packet.o||In function `enet_packet_resize':|
C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\packet.c|55|multiple definition of `enet_packet_resize'
|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\packet.o:C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\packet.c|55|first defined here|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\peer.o||In function `enet_peer_throttle_configure':|
C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\peer.c|44|multiple definition of `enet_peer_throttle_configure'
|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\peer.o:C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\peer.c|44|first defined here|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\peer.o||In function `enet_peer_throttle':|
C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\peer.c|65|multiple definition of `enet_peer_throttle'
|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\peer.o:C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\peer.c|65|first defined here|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\peer.o||In function `enet_peer_send':|
C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\peer.c|103|multiple definition of `enet_peer_send'
|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\peer.o:C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\peer.c|103|first defined here|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\peer.o||In function `enet_peer_receive':|
C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\peer.c|175|multiple definition of `enet_peer_receive'
|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\peer.o:C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\peer.c|175|first defined here|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\peer.o||In function `enet_peer_reset_queues':|
C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\peer.c|290|multiple definition of `enet_peer_reset_queues'
|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\peer.o:C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\peer.c|290|first defined here|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\peer.o||In function `enet_peer_reset':|
C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\peer.c|325|multiple definition of `enet_peer_reset'
|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\peer.o:C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\peer.c|325|first defined here|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\peer.o||In function `enet_peer_ping':|
C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\peer.c|378|multiple definition of `enet_peer_ping'
|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\peer.o:C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\peer.c|378|first defined here|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\peer.o||In function `enet_peer_disconnect_now':|
C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\peer.c|400|multiple definition of `enet_peer_disconnect_now'
|
obj\Debug\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\peer.o:C:\Users\user\Documents\CodeBlocksProjects\Lib\irrNetLite2.1Beta\irrNetLite\source\enet\peer.c|400|first defined here|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build finished: 50 errors, 0 warnings (0 minutes, 3 seconds) ===|
 


So if you need anymore info please let me know
Oster200
 
Posts: 60
Joined: Sun May 06, 2012 6:13 pm

Re: irrNetLite 2.1 [BETA]

Postby Kiristu » Tue Sep 24, 2013 10:56 am

Hi,

I think it might be too late, but I was able to compile the c::b lib quite easily by importing the MS Visual C++ project into c::b.
I just had to edit the "search directory" (in build options) to add the reference to the folder containing the enet stuff (x:\...\irrNetLite\source here).

Then compile it and get "lib.a" in the project directory.

However, I'm not working with c::b, so I won't try if this helps :)
Kiristu
 
Posts: 40
Joined: Wed Mar 13, 2013 12:31 am

Re: irrNetLite 2.1 [BETA]

Postby Oster200 » Thu Sep 26, 2013 1:55 am

Nope your not to late i am still around here but i will have to try that. I have took a break programming since other things have been needing my attention. I will post back when i get a chance if this works.
Oster200
 
Posts: 60
Joined: Sun May 06, 2012 6:13 pm

Re: irrNetLite 2.1 [BETA]

Postby Kiristu » Sat Sep 28, 2013 2:31 pm

OK just let me know.

I was able to configure C::B to compile the lib, so if you can't, we can compare our configuration. Worst case I could post the lib so that you can try if your application works with that one (I think the lib provided with IrrNetLite is compiled for MSVC and might not work on other compilers).
Kiristu
 
Posts: 40
Joined: Wed Mar 13, 2013 12:31 am

Re: irrNetLite 2.1 [BETA]

Postby Oster200 » Mon Sep 30, 2013 12:03 am

So i got it to compile like you said i imported the one vcproj and changed the search directory to include and source folder. compiled and it worked. I then made a new console project copied the example one code to the main and linked the lib, added the source and include folders in the build options, it did not run. i came up with errors (you can see some of the errors in the image). Here are some images to help if you dont understand.
http://imageshack.us/a/img31/2669/ij1.png
this shows that i have the lib.a that i just got done building in the linker settings and behind that you can also see that i copied the tutorial.cpp page in the main.

http://imageshack.us/a/img713/5438/xtyb.png
this shows that i added the search directories and the errors are there too not all of them but the beginning ones.

If we cant get this to work i think i will just use the enet lib not this wrapper but i would like to get this to work.

So i just closed the project and reopened it and now i got different errors a lot less and i think they might be easier to solve here they are
cpp Code: Select all
||=== test, Debug ===|
obj\Debug\main.o||In function `main':|
C:\Users\User\Documents\CodeBlocksProjects\test\main.cpp|99|undefined reference to `irr::net::createIrrNetServer(irr::net::INetCallback*, unsigned int, irr::net::SNetParams const&)'
|
C:\Users\User\Documents\CodeBlocksProjects\test\main.cpp|123|undefined reference to `irr::net::createIrrNetClient(irr::net::INetCallback*, char const*, unsigned int, irr::net::SNetParams const&)'|
C:\Users\User\Documents\CodeBlocksProjects\test\main.cpp|138|undefined reference to `irr::net::SOutPacket::SOutPacket()'
|
C:\Users\User\Documents\CodeBlocksProjects\test\main.cpp|141|undefined reference to `irr::net::SOutPacket::operator<<(char const*)'|
C:\Users\User\Documents\CodeBlocksProjects\test\main.cpp|144|undefined reference to `irr::net::SOutPacket::operator<<(irr::core::vector3d<float> const&)'
|
C:\Users\User\Documents\CodeBlocksProjects\test\main.cpp|144|undefined reference to `irr::net::SOutPacket::operator<<(float)'|
C:\Users\User\Documents\CodeBlocksProjects\test\main.cpp|147|undefined reference to `irr::net::SOutPacket::compressPacket()'
|
C:\Users\User\Documents\CodeBlocksProjects\test\main.cpp|155|undefined reference to `irr::net::SOutPacket::encryptPacket(char const*)'|
obj\Debug\main.o||In function `ZN13MyNetCallback12handlePacketERN3irr3net9SInPacketE'
:|
C:\Users\User\Documents\CodeBlocksProjects\test\main.cpp|44|undefined reference to `irr::net::SInPacket::decryptPacket(char const*)'|
C:\Users\User\Documents\CodeBlocksProjects\test\main.cpp|54|undefined reference to `irr::net::SInPacket::deCompressPacket()'
|
C:\Users\User\Documents\CodeBlocksProjects\test\main.cpp|64|undefined reference to `irr::net::SInPacket::operator>>(irr::core::string<char, irr::core::irrAllocator<char> >&)'|
C:\Users\User\Documents\CodeBlocksProjects\test\main.cpp|70|undefined reference to `irr::net::SInPacket::operator>>(irr::core::vector3d<float>&)'
|
C:\Users\User\Documents\CodeBlocksProjects\test\main.cpp|75|undefined reference to `irr::net::SInPacket::operator>>(float&)'|
||=== Build finished: 13 errors, 0 warnings (0 minutes, 0 seconds) ===|
Oster200
 
Posts: 60
Joined: Sun May 06, 2012 6:13 pm

Re: irrNetLite 2.1 [BETA]

Postby Kiristu » Thu Nov 07, 2013 3:42 pm

Hi,

Once again high latency in my answer, sorry :/

Well, I tried to create a new project to see how it works.
And it does work :)

However, I did not create a new console or whatever project, I have "Irrlicht project" in the template selection when I create a project via File->New->project.
Then I take that one and it just works fine (I have to chose Irrlicht libs home during the process and that's all).
I got a basic Irrlicht code showing an md2 file from Irrlicht resources.

If you're still in there and still have issues, and have a bit time between answers just tell me what it does ...
Kiristu
 
Posts: 40
Joined: Wed Mar 13, 2013 12:31 am

Re: irrNetLite 2.1 [BETA]

Postby user-r3 » Sun Oct 19, 2014 11:51 am

Hello,

I noticed a ... problem? with irrnetlite recently, after some debugging and checking (and stuff...)

While checking for perfomance issues I noticed that my FPS seems to stall at about 50, while my CPU is only at 10-15% (as I'm using a quad-core and quad-thread CPU it should be at 25% if one core is fully occupied, right?) and my GPU at about the same level.

I tried disabling my test-shaders and all kinds of stuff, but finally noticed that irrnetlite seems to be the cause.

With all irrnetlite code removed I get 100+ FPS on 25% CPU load (so one core is fully working)

So my question is:
Is there some kind of fps-limiter in irrNetLite?
Or is it possible to accidentaly implement one by using some irrNetLite functions in a "wrong" way?

Thanks for any reply in advance
Have a good day!
user-r3
 
Posts: 70
Joined: Tue Dec 07, 2010 4:09 pm

Re: irrNetLite 2.1 [BETA]

Postby tecan » Sun Nov 09, 2014 9:34 am

i tried fixing this for the latest enet without luck.
Live long and phosphor!
-- https://github.com/tecan/Luna Status 80%
User avatar
tecan
 
Posts: 338
Joined: Fri Jun 06, 2008 12:50 pm
Location: Edmonton, Alberta, Canada

Re: irrNetLite 2.1 [BETA]

Postby mongoose7 » Mon Nov 10, 2014 12:46 am

Does it contain a call to poll() or select()? If it does, check the time parameter.

More easily, if you are running on Windows and you open MediaPlayer, does your code run faster?
mongoose7
 
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: irrNetLite 2.1 [BETA]

Postby BlindSide » Mon Nov 10, 2014 5:28 pm

tecan wrote:i tried fixing this for the latest enet without luck.

Yeah I think it was actually available when I first made this but I found it quite difficult to utilise and settled on this older version. I vaguely recall some kind of out-of-bounds memory exception that was unfixable for me at the time.

mongoose7 wrote:Does it contain a call to poll() or select()? If it does, check the time parameter.

More easily, if you are running on Windows and you open MediaPlayer, does your code run faster?


I can't say for sure (Been years since I looked at this), but I don't think IrrNetLite is asynchronous in any way, so it might be blocking on a few things.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
BlindSide
Admin
 
Posts: 2820
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Re: irrNetLite 2.1 [BETA]

Postby Harch » Wed Jan 28, 2015 10:21 pm

If you enable the debugger (F8 in Code::Blocks), the program (the code below) takes off on a compressed package. Segmentation fault.
I am writing a fairly large program. She has recently started to take off on the compressed package. If you remove the compression package, it still flies in the destructor of allocator: irrAllocator.h.

Irrlicht 1.8.1. Help please.

P.S. The destructor is called in SOutPacket.cpp in line buff = newBuff.

The more I could not understand.

cpp Code: Select all
 #include <irrNet.h>
int main()
{
    irr::net::SOutPacket p;
    p << 123;
    p.compressPacket();
    return 0;
}
 
Harch
 
Posts: 66
Joined: Wed Oct 08, 2014 9:01 pm

Re: irrNetLite 2.1 [BETA]

Postby Harch » Wed Jan 28, 2015 10:59 pm

This error is to blame irrliht 1.8.1. If you compile without irrlicht, there is no error. Maybe someone will understand, what is it? Or rewrite irrnetlite using folders NoIrrlicht?
Harch
 
Posts: 66
Joined: Wed Oct 08, 2014 9:01 pm

PreviousNext

Return to Project Announcements

Who is online

Users browsing this forum: No registered users and 1 guest