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

Author Topic: [SOLVED] SFML 1.6 VC++ SocketTCP::Connect  (Read 3499 times)

0 Members and 2 Guests are viewing this topic.

Shimajda

  • Newbie
  • *
  • Posts: 17
    • View Profile
[SOLVED] SFML 1.6 VC++ SocketTCP::Connect
« 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)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
[SOLVED] SFML 1.6 VC++ SocketTCP::Connect
« Reply #1 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.
Laurent Gomila - SFML developer

Shimajda

  • Newbie
  • *
  • Posts: 17
    • View Profile
[SOLVED] SFML 1.6 VC++ SocketTCP::Connect
« Reply #2 on: April 13, 2010, 03:33:48 pm »
Im using sfml-network-s.lib only.
I have two releases and for mingw connect works.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
[SOLVED] SFML 1.6 VC++ SocketTCP::Connect
« Reply #3 on: April 13, 2010, 03:41:38 pm »
You must use sfml-network-s-d.lib in debug mode.
Laurent Gomila - SFML developer

Shimajda

  • Newbie
  • *
  • Posts: 17
    • View Profile
[SOLVED] SFML 1.6 VC++ SocketTCP::Connect
« Reply #4 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.