Closed. This question needs
debugging details。它当前不接受答案。
想改善这个问题吗?更新问题,以便将其作为
on-topic用于堆栈溢出。
4年前关闭。
Improve this question
尝试从nvidia存储库中获取
this sample,我按照他们给出的说明进行操作:
克隆了gl_commandlist_basic,shared_external,shared_sources和build_all,它们都处于同一级别(同一目录) build_all 中的
cmake -G "Visual Studio 14 2015 Win64"
使用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时,我并没有获得太多的运气,结果似乎都没有明确的解决方案,而且它们与其他事物严格相关
那么,有什么问题,伙计们?
对于下降投票者:寻求调试帮助的问题(“此代码为什么不起作用?”)必须包括所需的行为,特定的问题或错误以及在问题本身中再现该错误所需的最短代码。没有明确问题说明的问题对其他读者没有用。请参阅:如何创建最小,完整和可验证的示例。
寻求调试帮助的问题->我正在寻求编译帮助,这有点不同。如果您不知道它们之间的区别,建议您引用Wikipedia,阅读compilation和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
您可以在以前发布的链接中看到完整的输出在问题本身中重现它所需的最短代码->按照README.md中的说明进行操作,这也是我在上面列出的步骤
继续选择以相同的动机结束问题而没有试图回答我的观察结果,除了你自己的自我之外,对其他人没有帮助
编辑:因此,最后您在没有任何 build 性反馈的情况下结束问题,这还不错。唯一的异常(exception)是一个独特的评论,尽管这很有趣,因为那个人明确承认这是因为错误的感知的懒惰,尽管如此,他没有再回答..相反,他甚至投票结束了这个问题……lmao
更有趣的是,他们似乎懒得阅读开头的链接,但不足以向下滚动并选择关闭问题。
伙计们,一切都不错,出色的支持!
天哪,每次我不得不面对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.