- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
在尝试在 Windows 10 中编译 DOSBox SVN Daum 时,我遇到了与 header 相关的问题,这对于 VS2015 来说显然是新问题。示例:
Severity Code Description Project File Line Suppression State
Error (active) the global scope has no "int_least8_t" dosbox c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cstdint 23
Error C2039 'int_least8_t': is not a member of '`global namespace'' dosbox C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cstdint 23
我的搜索告诉我这种问题已经发生在周围的项目中,但我无法修复它。
特别是,我阅读了 VisualStudio 2015 RC Issue with Includes和 https://blogs.msdn.microsoft.com/vcblog/2015/03/03/introducing-the-universal-crt/ ,然后将AppData\Local\Microsoft\MSBuild\v4.0\Microsoft.Cpp.Win32.user.props的内容改成:
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets">
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<IncludePath>D:\dev\include;$(UniversalCRT_IncludePath);$(IncludePath)</IncludePath>
<LibraryPath>D:\dev\lib;$(UniversalCRT_LibraryPath_x86);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup />
<ItemGroup />
</Project>
虽然运气不好。 :(
图片:
我远不是一个经验丰富的 C 程序员。谁能告诉我缺少什么?谢谢!
最佳答案
我在另一个程序上遇到了同样的问题,在查看了包含的内容后,我终于解决了它。
如果您查看最近的 Visual Studio 中的典型 cstdint
,您会注意到一个包含是 stdint.h
。这是存在各种类型的实际定义的地方。 cstdint
所做的是将定义导出为 std
命名空间的成员。
但是,这里显示的是,虽然带有 intXX_t
的第一行编译正常,但 int_least_xx_t
却没有。这是因为它读取了错误的 stdint.h
文件,该文件没有一些所需的定义。该文件是由那些想在 MSVC 支持之前使用命名大小的人编写的(他们随 C99 一起提供,MSVC 从未真正支持过,然后在 C++11 中,当时 MSVC 提供了支持)。
因为他们只需要确切的类型,所以他们没有为其他类型编写定义。既然 MSVC 支持了,就不需要这个兼容文件了。但是,由于项目文件未更新,编译器会找到错误的兼容性 header 而不是正确的 header ,从而导致此错误。
有两种方法可以解决这个问题:更改包含文件夹的顺序以便它获得您想要的文件夹,或者删除错误的 stdint.h
文件。它很容易找到,因为您可以使用 Visual Studio 打开 #include
文件。对于您的情况,该文件位于 src/platform/visualc/
目录中。
附录:这是我的错误stdint.h
文件
#pragma once
/* a minimal set of C99 types for use with MSVC */
typedef signed char int8_t;
typedef short int int16_t;
typedef int int32_t;
typedef __int64 int64_t;
typedef unsigned char uint8_t;
typedef unsigned short int uint16_t;
typedef unsigned int uint32_t;
typedef unsigned __int64 uint64_t;
关于c - VS 2015 C 头错误 C2039 : 'int_least8_t' : is not a member of '` global namespace'',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41051840/
我们有一个包含重复用户记录的数据库,我需要根据几个因素选择“最佳”用户: 应先选择具有成员(member)资格的用户,然后再选择没有成员(member)资格的用户 成员(member)有级别,在所有条
不知道为什么 Visual Studio 发出此警告: Access of shared member, constant member, enum member or nested type thr
我有一个数据库设置来注册网站的成员(member)专用区域的成员(member)。我可以使用复选框回显所有注册成员,以便我可以选择从管理页面删除单个成员,但我似乎无法弄清楚如何在单击提交按钮时选择删除
假定前缀一元运算符可以“由不带参数的非静态成员函数或带一个参数的非成员函数实现”(§13.5.1[over.unary]/1),除了适用于任何成员/非成员函数选择的通常封装/代码重用设计原理之外,还有
拥有 struct Person { string name; }; Person* p = ... 假设没有运算符被重载。 哪个更有效(如果有的话)? (*p).name 对比 p->name
进程文件: members-area or members-area.exe 进程名称: 5-1-61-96 进程类别:存在安全风险的进程 英文描述: 
引用资料 http://msdn.microsoft.com/en-us/library/6tc47t75%28v=VS.80%29.aspx http://msdn.microsoft.com/en
这个问题在这里已经有了答案: Is there any reason to use this-> (16 个答案) 关闭 7 年前。 这有什么区别: int MyClass::getId() {
我正在制作一个网站,您需要在其中注册,然后创建一个角色来玩。我如何将注册页面中使用的表格与玩家的表格结合起来,以便玩家始终获得他创建的角色。 我有一个表members,用于存储注册用户以及角色的 ta
我处于困境中,我被委托(delegate)创建一个 PHP Web 应用程序,该应用程序允许一个人注册,然后该用户可以再注册 5 个其他用户,他注册的其他用户也可以每个注册 5 个成员。 我希望创建数
我试图在成员(member)页面上显示一个非常简单的用户名。我已经在 stackoverflow 上搜索过,但使用我发现的内容不起作用。 我使用 HTML 表单指南中非常常见的注册/登录脚本,该脚本使
我正在使用CodeIgniter,我的问题是关于MySQL查询。我有两个表,分别是成员和关系。 成员表 我正在做的是,根据member_type将所有用户添加到成员表中。如果 member_type
我有一个表,用于存储 2 个成员(成员 A 和成员 B)之间的聊天信息。现在,当成员 A 删除他的消息时,我会抛出这样的 sql 请求 $deleting = mysqli_query($connec
from bs4 import BeautifulSoup import requests r = requests.get('http://medicalassociation.in/doctor-
我有两个我无法修改的类,它们都具有完全相同的成员: class Pose1 { public: double x,y; }; class Pose2 { public: d
我正在测试服务器上运行机器人。当前 channel 中有 3 个成员(member_count of 3),但它只返回一个成员。该成员是机器人。 代码: import discord from dis
我有一个对象,我们称之为 o,以及对 o 的引用。 在o范围内,我设置了一个成员,我们称之为m。 所以在 o 中,我调用: o.m = "blah" 在 o 之外,我访问 m: console.log
我正在尝试实现自定义成员(member)资格提供程序并希望更改 GetUser 方法。问题是 GetUser 返回 MembershipUser,而我想返回 MyMembershipUser,它有两个
我的网站有一个推荐给 friend 的按钮。为了鼓励人们使用此功能,我想用积分奖励那些使用它的人(积分将兑换奖品......还不知道)。 好的,所以我有这样的结构: 表单.php 您可以在此处输入 f
我在 MySQL 中有三个表, 组(键:group_id) 成员(键:member_id) group_member_relations 键:group_id, member_id 最后一个表包含 m
我是一名优秀的程序员,十分优秀!