这个问题很大程度上与我的previoustwo问题有关。包括socket.io-client-cpp和提升到Windows 8 C++应用程序
我已经构建并在我的项目中包含了boost 1.51。
在我Socket.IO接口文件(pch.h一起),这是我包括顺序:
#include <wrl.h>
#include <dwrite_1.h>
#include <wincodec.h>
#include <agile.h>
#include "types.h"
#include <cstdint>
#include <stdint.h>
#include <climits>
#include <cstdlib>
#include "boost/cstdint.hpp"
#include "boost/asio.hpp"
#include "boost/bind.hpp"
#include <sio_client_handler.hpp>
#include "boost/thread.hpp"
当我编译我的代码,我得到下面的输出(仅前几行):
错误1个错误C2039: 'int_least8_t':不是 '`全局命名空间'”(SocketIO.cpp)C的成员:\程序文件(86)\微软的Visual Studio 11.0 \ VC \ include \ cstdint
错误2错误C2873:'int_least8_ t':符号不能用于使用声明(SocketIO.cpp)c:\ program files(x86)\ microsoft visual studio 11.0 \ vc \ include \ cstdint
错误3错误C2039:'int_least16_t':is不是“全局命名空间”(SocketIO.cpp)的成员c:\ program files(x86)\ microsoft visual studio 11.0 \ vc \ include \ cstdint
错误4错误C2873:'int_least16_t':symbol can not be在使用声明(SocketIO.cpp)中使用c:\ program files(x86)\ microsoft visual studio 11.0 \ vc \ include \ cstdint
有超过100个以上错误。
我正在使用Microsoft Visual Studio 2012 Express C++,并且一直未能想出或找到解决方案。
这并没有解决问题。我添加了两个作为测试,因为增加一个或其他原本并没有解决这个问题,并暂时离开。 – OzBarry
你是不是深究''(也许包括头部)以查看'int_least8_t'是否甚至定义在那里?如果是这样,我们将需要更多的代码 - 包含在'.cpp'中的重要代码可能会重现此问题。 –
它确实在cstdint中定义。我认为主要的问题是boost和C++ cx在一起玩不好。 – OzBarry