Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ZamenWolk

Pages: [1]
1
General / Re: Code compiling fails with cmake
« on: October 27, 2014, 08:41:16 pm »
Oh oops. It's actually an error, I deleted it accidentally before posting because I tested other things. I added it now, and I have these errors :

(click to show/hide)

Here is the new cmakelist
(click to show/hide)

2
General / Code compiling fails with cmake
« on: October 27, 2014, 08:20:24 pm »
Hello everybody,

So I'm trying this new IDE called CLion, and I need to use cmake to compile my code. I learnt a lot on that, and I've been trying to make SFML work properly with it, but it keeps giving me weird errors after it creates the .obj files. Can someone help ?

Here are the errors when I compile :

(click to show/hide)

Here is my CMakeLists.cmake file :

(click to show/hide)

I am using static linkage of SFML, I have compiled SFML myself, with the version of MinGW I'm using, and this is the master build I downloaded off GitHub

Thanks all for your help, I'm really lost here.

Happy coding,
ZamenWolk

EDIT : Fixed errors

3
Network / Re: Unexpected SocketSelector behavior
« on: October 10, 2014, 01:03:05 pm »
So I have updated my project os it's wayyy more simple, but there is still the error bothering me

main.cpp
bool aboutToStop = false;

int main()
{
    TcpListener             listener;
    unsigned int            subserverNumber(50);
    vector<TcpSocket*>      clientsVector;
    SocketSelector          selector;

    for (int i = 0; i < subserverNumber; i++)
    {
        TcpSocket* newSocket = new TcpSocket;
        clientsVector.push_back(newSocket);
    }

    selector.add(listener);

    //Addition of all the sockets to the selector
    for (int i = 0; i < clientsVector.size(); i++)
    {
        selector.add(*clientsVector[i]);
    }

    listener.listen(2715);

    cout << "The server host is now ready and working !" << endl;

    while (!aboutToStop)
    {
        cout << "Searching for event" << endl;

        if (selector.wait())
        {
            cout << "Found something !" << endl;
        }
        else
        {
            cout << "Couldn't find anything" << endl;
        }

        sf::sleep(sf::milliseconds(25));
    }

    return EXIT_SUCCESS;
}

4
Network / Re: Unexpected SocketSelector behavior
« on: October 10, 2014, 12:50:42 am »
Ahah yeah that's probably right, will do :) I'll come back with something better

5
Network / Unexpected SocketSelector behavior
« on: October 10, 2014, 12:22:08 am »
Hello everyone :)

I'm here today to seek help for my program that I've been coding for quite a bit now, and I've been stuck for about a week over a very annoying bug, and I'm here because I really don't know what to do anymore. My problem is that my socket selector always returns "false" immediatly when I call wait(), no matter if there is actually someone trying to connect on the listener, or if I put a timeout argument.I'm really out of ideas about what it could be, so any help would be more than welcome :)

EDIT : There's a much simpler version of the code 2 posts below :)

Here's my code :

main.cpp
(click to show/hide)

FightSubserver.hpp
(click to show/hide)

FightSubserver.cpp
(click to show/hide)

ServerClient.hpp
(click to show/hide)

In case you want to see the functor, here is functor.hpp
(click to show/hide)

And thank you in advance for your help :)

Zamen

Pages: [1]
anything