On 2/28/2011 3:22 AM, Alan Vella wrote:
Hi Dave,
Thanks for your reply. Unfortunately compiling the code in VS2008 throws the same kind of errors + more! Did nobody ever come across these errors? The first lines seem to point towards a solution:
Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately. For example: 1> - add -D_WIN32_WINNT=0x0501 to the compiler command line; or 1> - add _WIN32_WINNT=0x0501 to your project's Preprocessor Definitions. 1> Assuming _WIN32_WINNT=0x0501 (i.e. Windows XP target).
But I'm not sure what they mean.
Regards,
Alan.
Alan, From what I see in the code and the mailing lists, the _WIN32_WINNT definition specifies the "earliest" operating system that you are building your code for. If you want your code to run on Windows XP or later, specify _WIN32_WINNT=0x0501 . If you don't do this, the asio code will assume _WIN32_WINNT=0x0501 but gives a warning (not an error) letting you know that this assumption is being made. That is what you are seeing in these two lines. It probably has nothing to do with the later errors you are seeing. To get rid of these warnings in VS, go to the Property form for your project, and in "Configuration Properties, C/C++, Preprocessor, Preprocessor Definitions" enter _WIN32_WINNT=0x0501 . Again, it probably has nothing to do with the later errors but it should help clean things up a little. - Dave