Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::asio from C++ Forms App in VS 2010
From: Dave (to.dave.c_at_[hidden])
Date: 2011-02-28 13:04:30


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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net