SFML community forums

Help => General => Topic started by: Knarf0 on August 11, 2015, 12:50:52 pm

Title: How to stop SFML from printing Warnings ?
Post by: Knarf0 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
Title: Re: How to stop SFML from printing Warnings ?
Post by: Laurent 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).
Title: Re: How to stop SFML from printing Warnings ?
Post by: Knarf0 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 ?
Title: Re: How to stop SFML from printing Warnings ?
Post by: Laurent 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.