Mingw-x64 中的类型错误
type errors in Mingw-x64
我正在尝试在Windows上构建我的项目(wpilib),来自Linux,在那里它工作正常。我安装了 mingw,但这似乎没有我正在使用的所有线程内容,所以我删除了它并安装了 mingw-x64。这让我走得更远,但现在我被困在这里。
In file included from C:/Program Files/mingw-w64/x86_64-5.1.0-posix-seh-rt_v4-rev0/mingw64/x86_64-w64-mingw32/include/winsock2.h:55:0,
from C:Userspetergz-wsboost_1_56_0/boost/asio/detail/socket_types.hpp:38,
from C:Userspetergz-wsboost_1_56_0/boost/asio/detail/win_tss_ptr.hpp:23,
from C:Userspetergz-wsboost_1_56_0/boost/asio/detail/tss_ptr.hpp:25,
from C:Userspetergz-wsboost_1_56_0/boost/asio/detail/call_stack.hpp:20,
from C:Userspetergz-wsboost_1_56_0/boost/asio/impl/handler_alloc_hook.ipp:19,
from C:Userspetergz-wsboost_1_56_0/boost/asio/handler_alloc_hook.hpp:80,
from C:Userspetergz-wsboost_1_56_0/boost/asio/detail/handler_alloc_helpers.hpp:21,
from C:Userspetergz-wsboost_1_56_0/boost/asio/detail/bind_handler.hpp:19,
from C:Userspetergz-wsboost_1_56_0/boost/asio/detail/wrapped_handler.hpp:18,
from C:Userspetergz-wsboost_1_56_0/boost/asio/io_service.hpp:24,
from C:Userspetergz-wsboost_1_56_0/boost/asio/basic_io_object.hpp:19,
from C:Userspetergz-wsboost_1_56_0/boost/asio/basic_socket.hpp:20,
from C:Userspetergz-wsboost_1_56_0/boost/asio/basic_datagram_socket.hpp:20,
from C:Userspetergz-wsboost_1_56_0/boost/asio.hpp:21,
from C:Userspetergz-wsgazebobuildinstallDebugincludegazebo-6.0/gazebo/transport/Connection.hh:23,
from C:Userspetergz-wsgazebobuildinstallDebugincludegazebo-6.0/gazebo/transport/transport.hh:3,
from C:Userspeterwpilibcppcurrentsiminclude/DriverStation.h:9,
from C:Userspeterwpilibcppcurrentsiminclude/RobotBase.h:9,
from C:Userspeterwpilibcppcurrentsiminclude/WPILib.h:35,
from ..srcOI.h:11,
from ..srcOI.cpp:8: C:/Program Files/mingw-w64/x86_64-5.1.0-posix-seh-rt_v4-rev0/mingw64/x86_64-w64-mingw32/include/psdk_inc/_socket_types.h:11:9: error: 'UINT_PTR' does not name a type typedef UINT_PTR SOCKET;
出于某种原因,将以下内容添加到我的所有.cpp文件中似乎已经解决了该特定问题。我注意到每个人似乎都把它放在首位,但我没有看到这和UINT_PTR
之间的联系,这是在basetsd.h
中定义的
#ifdef _WIN32
// Ensure that Winsock2.h is included before Windows.h
#include <Winsock2.h>
#endif
如果有人弄清楚为什么这可以修复它,我很想知道
相关文章:
- 我的模板类方法返回错误类型?
- 错误:类型"double()"和"double()"的操作数无效到二进制&quo
- 类型为 "int*" 的参数与 C++ 中错误类型"int**"参数不兼容
- glDrawElements GL 错误类型 = 0x824c,严重性 = 0x9146,消息 = GL_INVALID
- Eclipse/CDT_C++给出"语义错误_"类型XXX无法解决"。项目运行
- turbo 为什么我的C++代码中出现错误类型名称预期"错误?
- "auto"推断出 hashtable_policy.h 中的错误类型
- 设计自己的结果/两者之一:是否应该始终指定成功类型和错误类型
- 如何修复"ctypes"。参数错误:参数 2:<键入"异常.类型错误">:RaspberryPi 中的错误类型"错误
- 在 vscode 上编译错误.类型说明符是 C++11 扩展
- 不允许使用错误类型
- 当读取错误类型时,CIN覆盖我的初始化值
- C++:"错误:类型'const char*'和'const char [28]'的操作数无效到二进制'ope
- 我的代码错误类型警告 1 警告 C4018 和更多错误
- 在shared_from_this()中的错误类型(在继承类中)(是否有dyn.type-ware shared Poi
- 为什么缩小转换范围不能防止错误类型的map.insert()失败
- 程序总是返回二进制'>>':找不到运算符,它采用错误类型的左操作数
- 错误:类型为 '.&' 来自类型的临时 '..*康斯特'
- 涉及将要馈送的向量转换为execvp的错误类型
- C++中是否存在错误类型