I seem to be having trouble getting Boost::asio to work with MinGW with Eclipse.
I am using Boost version 1.50.
I have read around and am suprised very few people had this problem. I get this error when trying to use the Boost::asio Library:
"swprintf was not declared in this scope"
I got this error when I tried to use:
#define WIN32_WINNT 0x0501
#define WINVER 0x0501
in order to get around the UnregisteredWaitEx has not been declared error. Which seems unfortunate, because this makes the windows library for Windows XP the library to use. What if I want to use Windows 8 features?
Isn't there another way? I can get other Boost libraries to work, including Thread and XML.
I hear that often times these problems are due to ordering, but i've been switching things around and I still can't get rid of the error.
This is the order I am including:
#include <boost/bind.hpp>
#include <boost/asio.hpp>
#include <boost/thread/thread.hpp>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <winsock2.h>
#include <glew.h>
#include <glfw3.h>
The libraries are in the same order.
How do you get Boost::asio to work? Preferably without having to downgrade to WindowsXP windows.h.