nv-pro样本编译失败,全局作用域没有"int_least8_t"
nv-pro samples compiling failure, the global scope has no "int_least8_t"
为了让 nvidia 存储库中的 this sample 正常工作,我按照他们给出的说明进行操作:
- 克隆 gl_commandlist_basic, shared_external, shared_sources和build_all,都是同级(同目录)
cmake -G "Visual Studio 14 2015 Win64"
里面build_all
- 使用 vs2015 CE 打开
ALL_BUILD.vcxproj
并构建
完整输出:
https://gist.github.com/elect86/a5272f2350e746d22f0352553d55669d
大多数错误如下所示:
error C2039: 'int_least8_t': is not a member of '`global namespace''
error C2873: 'int_least8_t': symbol cannot be used in a using-declaration
Here 同一套件的另一个样本存在问题,错误完全相同。其中一位用户表示这是 C 和 C++ 混合使用不当造成的问题
尝试 google,我运气不佳,结果 none 似乎有明确的分辨率,并且它们与其他东西严格相关
所以,问题是什么,伙计们?
反对者:
寻求调试帮助 ("why isn't this code working?") 的问题必须包括所需的行为、特定问题或错误以及在问题本身中重现它所需的最短代码。没有明确问题陈述的问题对其他读者没有用。请参阅:如何创建最小、完整且可验证的示例。
- 寻求调试帮助的问题 -> 我正在寻求编译帮助,有点不同。如果你不知道区别,我建议你参考维基百科,阅读 compilation and debugging 定义
- 期望的行为 -> 编译示例
一个特定的问题或错误 -> 数百个:
error C2039: 'int_least8_t': is not a member of '`global namespace''
error C2873: 'int_least8_t': symbol cannot be used in a using-declaration
您可以在之前发布的link中看到完整的输出
在问题本身中重现它所需的最短代码 -> 按照 README.md 中的说明进行操作,这也是我上面列出的步骤
继续选择以同样的动机结束问题,甚至不尝试回复我的观察,除了你自己的自我之外,对任何人都没有帮助
编辑:
所以最后你在没有任何建设性反馈的情况下结束了问题,不错。唯一的例外是一个独特的评论,虽然这有点好笑,因为那个人明确承认这是因为一种错误的懒惰,但他没有进一步回复..相反,他甚至投票决定关闭这个问题...... lmao
更有趣的是,他们似乎懒得阅读开头的 link,但还不足以向下滚动并选择关闭问题..
一点都不差,伙计们,非常棒的支持!
天啊,每次要面对C/C++社区总是血洗...
编辑2:
Will Perone (@Nvidia) 想回应,但他没有足够的声誉,所以我引用他的话:
the answer there is on the right track. There is a stdint.h in
nvpro-samples\shared_external\NSight for compatibility with old
versions of visual studio in there. You can just delete that and it
should all work. I'm going to follow up with the maintainer of the
repo.
I haven't tested that solution with earlier versions of visual studio but it should work in 15. Will see if I
can get the maintainer to do an official fix for it. I think it's
because some of the samples were made before VS 15 came out and not
updated.
这个问题(可能)是由NSight集成引起的。那里曾经有一个旧版 stdint.h,但不久前被删除了。
尝试从 CMake 中删除 _addPackageNSight 并重建。
还要确保你拉了最新的 shared_sources 和 shared_external.
为了让 nvidia 存储库中的 this sample 正常工作,我按照他们给出的说明进行操作:
- 克隆 gl_commandlist_basic, shared_external, shared_sources和build_all,都是同级(同目录)
cmake -G "Visual Studio 14 2015 Win64"
里面build_all- 使用 vs2015 CE 打开
ALL_BUILD.vcxproj
并构建
完整输出:
https://gist.github.com/elect86/a5272f2350e746d22f0352553d55669d
大多数错误如下所示:
error C2039: 'int_least8_t': is not a member of '`global namespace''
error C2873: 'int_least8_t': symbol cannot be used in a using-declaration
Here 同一套件的另一个样本存在问题,错误完全相同。其中一位用户表示这是 C 和 C++ 混合使用不当造成的问题
尝试 google,我运气不佳,结果 none 似乎有明确的分辨率,并且它们与其他东西严格相关
所以,问题是什么,伙计们?
反对者:
寻求调试帮助 ("why isn't this code working?") 的问题必须包括所需的行为、特定问题或错误以及在问题本身中重现它所需的最短代码。没有明确问题陈述的问题对其他读者没有用。请参阅:如何创建最小、完整且可验证的示例。
- 寻求调试帮助的问题 -> 我正在寻求编译帮助,有点不同。如果你不知道区别,我建议你参考维基百科,阅读 compilation and debugging 定义
- 期望的行为 -> 编译示例
一个特定的问题或错误 -> 数百个:
error C2039: 'int_least8_t': is not a member of '`global namespace'' error C2873: 'int_least8_t': symbol cannot be used in a using-declaration
您可以在之前发布的link中看到完整的输出
在问题本身中重现它所需的最短代码 -> 按照 README.md 中的说明进行操作,这也是我上面列出的步骤
继续选择以同样的动机结束问题,甚至不尝试回复我的观察,除了你自己的自我之外,对任何人都没有帮助
编辑: 所以最后你在没有任何建设性反馈的情况下结束了问题,不错。唯一的例外是一个独特的评论,虽然这有点好笑,因为那个人明确承认这是因为一种错误的懒惰,但他没有进一步回复..相反,他甚至投票决定关闭这个问题...... lmao
更有趣的是,他们似乎懒得阅读开头的 link,但还不足以向下滚动并选择关闭问题..
一点都不差,伙计们,非常棒的支持!
天啊,每次要面对C/C++社区总是血洗...
编辑2: Will Perone (@Nvidia) 想回应,但他没有足够的声誉,所以我引用他的话:
the answer there is on the right track. There is a stdint.h in nvpro-samples\shared_external\NSight for compatibility with old versions of visual studio in there. You can just delete that and it should all work. I'm going to follow up with the maintainer of the repo. I haven't tested that solution with earlier versions of visual studio but it should work in 15. Will see if I can get the maintainer to do an official fix for it. I think it's because some of the samples were made before VS 15 came out and not updated.
这个问题(可能)是由NSight集成引起的。那里曾经有一个旧版 stdint.h,但不久前被删除了。 尝试从 CMake 中删除 _addPackageNSight 并重建。 还要确保你拉了最新的 shared_sources 和 shared_external.