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

Author Topic: [SFML 2.0] IPAddress::ToString is not working  (Read 3542 times)

0 Members and 1 Guest are viewing this topic.

Fred_FS

  • Newbie
  • *
  • Posts: 48
    • View Profile
[SFML 2.0] IPAddress::ToString is not working
« on: August 28, 2011, 05:59:05 pm »
Hello,

if I use the IPAddress::ToString function I allways get a "Debug Assertion Failed"-error.
The expression is: _CrtIsValidHeapPointer( pUserData )

My very simple code is:
Code: [Select]

int main( int argc, char* argv[] )
{
sf::IpAddress ip("192.168.1.1");
std::cout << ip.ToString();
return 0;
}


Do I use this function in a wrong way or is it maybe a bug in SFML 2.0?

Thanks for your help,
Fred

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
[SFML 2.0] IPAddress::ToString is not working
« Reply #1 on: August 28, 2011, 07:18:59 pm »
Make sure that you're not using release libraries in debug mode.

Does everything else works (window, graphics and audio modules)?
Laurent Gomila - SFML developer

Fred_FS

  • Newbie
  • *
  • Posts: 48
    • View Profile
[SFML 2.0] IPAddress::ToString is not working
« Reply #2 on: August 29, 2011, 03:56:25 pm »
The other modules are working working well. And I compiled them all together. So I don't think, that I am using a wrong library.

Is my code working for you? If it does, there must be something wrong with my libs.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
[SFML 2.0] IPAddress::ToString is not working
« Reply #3 on: August 29, 2011, 08:40:31 pm »
Yes it works for me (Windows 7, VC++ 2008, static libraries).
Laurent Gomila - SFML developer

Fred_FS

  • Newbie
  • *
  • Posts: 48
    • View Profile
[SFML 2.0] IPAddress::ToString is not working
« Reply #4 on: August 30, 2011, 11:12:39 am »
Okay, thank you.

I used an old version of SFML 2, so there must have been the problem. I upgraded to a new one and now it's working.

 

anything