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 - Walta69

Pages: [1] 2
1
General / Re: Weird Linking Errors
« on: July 26, 2014, 03:07:56 pm »
Oh wait, figured it out :) I'm using 3 other libraries as well so I must have deleted something by mistake in the process :)

2
General / Re: Weird Linking Errors
« on: July 26, 2014, 02:54:23 pm »
Is there any difference between normal VC2010 and VC2010 Express? (If there is even a difference?)

3
General / Weird Linking Errors
« on: July 26, 2014, 02:53:33 pm »
So I downloaded the (Visual C++ 10 (2010) - 64 bits) version and set it up with VC2010. I know I did it correctly as I have done it countless times on VC2013.

I am able to include necessary files and see all sfml code however when I build I get linking errors :/

Example:

error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::display(void)" (__imp_?display@Window@sf@@QAEXXZ)

4
General / Re: Linking a Database to SFML game
« on: May 13, 2014, 07:59:30 pm »
Alright thanks alot :) I'll look into it :)

5
General / Linking a Database to SFML game
« on: May 13, 2014, 07:43:35 pm »
Alright, so I have spent countless hours trying to find something remotely similar to
what I want and there is no simple answer.

All I want is a simple MySql database which I can connect to my sfml game. I don't need anything
advanced. My problem is that I want the database to be local as I will only need to access it from 1
computer. How can I go about doing this??

I am using Visual Studio 2013 and everything seems so complicated with trying to link databases.

Note: I have done a useless course on databases where we learn't sql but not actually how to use
it with our C++ programs :/ Treat me as such :P

6
Network / Re: Server not working over INTERNET
« on: May 07, 2014, 05:13:13 pm »
Ok I think im sort of getting to the solution. It MAY be a problem with my code.

The server is fine when clients are connecting to it. It runs perfectly. As soon as a client leaves it causes
issues for other clients trying to connect.

7
Network / Server not working over INTERNET
« on: May 07, 2014, 04:30:59 pm »
Hi,

I made a TCP server. The server works PERFECTLY when i connect to it on my local PC. As soon as I gave the
client program to my friends and they try to connect, it works sometimes but other times it just stops
working.

My ports are forwarded.

Anything that you could suggest that I am doing wrong?/

8
System / Re: Threads not running in parallel
« on: May 04, 2014, 12:12:17 am »
Thank you :O

9
System / Re: Threads not running in parallel
« on: May 04, 2014, 12:11:49 am »
I am a retard.

10
System / Re: Threads not running in parallel
« on: May 04, 2014, 12:01:48 am »
I have done all of the above:

void Server::StartThread()
{
   serverThread = new std::thread(&Server::test, this);
   serverThread->join();
}

which gets called in the main as follows:

int main()
{
   Server * server;
   server = new Server(8080); // start server
...
...
...
            else if (e.key.code == sf::Keyboard::S)
            {
               if (!hasChosen)
               {
                  hasChosen = true;
                  std::cout << "Test";
                  server->StartThread();
               }
            }
...
...
...

11
System / Re: Threads not running in parallel
« on: May 03, 2014, 11:54:24 pm »
So what do you suggest I do?

12
System / Re: Threads not running in parallel
« on: May 03, 2014, 11:48:24 pm »
Note I am now using std::thread

13
System / Re: Threads not running in parallel
« on: May 03, 2014, 11:48:04 pm »
Ok wait, I did a test method here to show that the thread is not being destroyed:

Server::Server(int port)
{
   listener.listen(port);
   selector.add(listener);
   done = false;
   serverThread = new std::thread(&Server::test, this);
   serverThread->join();
}
void Server::test()
{
   while (true)
   {
      std::cout << "This is a test \n";
   }
}

The program continuously outputs "this is a test"

14
System / Re: Threads not running in parallel
« on: May 03, 2014, 11:39:07 pm »
It still makes no difference. Im pretty sure that my members aren't being deleted because my thread is running all the time. I put a std::cout in the thread and it is running permanently yet the "window thread" is just pausing.

15
System / Re: Threads not running in parallel
« on: May 03, 2014, 11:30:27 pm »
Server::Server(int port)
{
   listener.listen(port);
   selector.add(listener);
   done = false;
   serverThread = new sf::Thread(&Server::startServer, this);
   serverThread->launch();

}

where serverThread is a member of Server of pointer type

Pages: [1] 2
anything