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

Author Topic: How to stop SFML from printing Warnings ?  (Read 2200 times)

0 Members and 1 Guest are viewing this topic.

Knarf0

  • Newbie
  • *
  • Posts: 7
    • View Profile
How to stop SFML from printing Warnings ?
« on: August 11, 2015, 12:50:52 pm »
Hi,

When I compile my code with these args
Quote
-W -Wall -std=c++11
Everything is fine.
But when I compile with these args
Quote
$$(pkg-config --cflags --libs gtk+-2.0) -W -Wall -std=c++11
My program runs fine as always but SFML is often printing Warnings such as
Quote
Warning: Partial sends might not be handled properly.
(when sending data through non-blocking tcp socket), how to prevent SFML from printing these annoying Warnings ?
Keep in mind that I need to tell the compiler wich directory to include for gtk so I can't juste remove the compiler argument.

Thanks

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: How to stop SFML from printing Warnings ?
« Reply #1 on: August 11, 2015, 12:59:19 pm »
This warnings informs you that the send function that you use is not suited for non-blocking sockets, and may cause problems.

With non-blocking sockets, you have to use the new overload of the send function which allows you to correctly handle partial send (and you'll have to adjust the calling code slightly).
Laurent Gomila - SFML developer

Knarf0

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: How to stop SFML from printing Warnings ?
« Reply #2 on: August 11, 2015, 01:03:30 pm »
Thank you.

But what has it to do with the way I compile my program ?
Maybe I have two versions of SFML on my computer, and depending on the way I compile it includes one or another ?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: How to stop SFML from printing Warnings ?
« Reply #3 on: August 11, 2015, 02:10:02 pm »
Quote
Maybe I have two versions of SFML on my computer, and depending on the way I compile it includes one or another ?
Most likely.
Laurent Gomila - SFML developer