SFML community forums

Help => Network => Topic started by: Shimajda on April 13, 2010, 03:20:29 pm

Title: [SOLVED] SFML 1.6 VC++ SocketTCP::Connect
Post by: Shimajda on April 13, 2010, 03:20:29 pm
I have another problem  :)

Cant get SocketTCP::Connect to work under VisualStudio2008.
After linking program startsup and when he call Connect function i have something like that:
http://zapodaj.net/0f0481fada1e.png.html
Continue button sems to be endless loop.

Heres my code (VS Win32 Console App project):
Code: [Select]
#include "stdafx.h"
#include <SFML/Network.hpp>


int _tmain(int argc, _TCHAR* argv[])
{
sf::SocketTCP Client;
if (Client.Connect(4567, "192.168.0.2") != sf::Socket::Done)
{
// Error...
}
return 0;
}


SFML 1.6 for VisualStudio2008 (static)
Title: [SOLVED] SFML 1.6 VC++ SocketTCP::Connect
Post by: Laurent on April 13, 2010, 03:29:17 pm
I have no problem with this code. Make sure that you're not using release libraries in debug mode.
Title: [SOLVED] SFML 1.6 VC++ SocketTCP::Connect
Post by: Shimajda on April 13, 2010, 03:33:48 pm
Im using sfml-network-s.lib only.
I have two releases and for mingw connect works.
Title: [SOLVED] SFML 1.6 VC++ SocketTCP::Connect
Post by: Laurent on April 13, 2010, 03:41:38 pm
You must use sfml-network-s-d.lib in debug mode.
Title: [SOLVED] SFML 1.6 VC++ SocketTCP::Connect
Post by: Shimajda on April 13, 2010, 03:58:27 pm
Thanks again  :D
Ive linked -s-d to Debug config, and -s to Relase config. Both are working.