boost::asio使用

问题遇到的现象和发生背景

在Qt编程的时候要使用boost::asio库。但是添加了boost库之后include头文件和命名空间名称找不到,如图:

img

#include <boost/asio.hpp>
service.cpp:2:10: In included file: definition of builtin function '_InterlockedAnd64'
winnt.h:: error occurred here

using boost::asio;
service.cpp:4:14: Using declaration cannot refer to a namespace

请问有朋友知道吗

缺少宏定义,加一下下面的代码

#ifdef _MSC_VER  
#ifndef _WIN32_WINNT
#define _WIN32_WINNT    0X0601  //windows7
#endif
#endif