编译问题 C++
嘿伙计们。 我需要编译一些项目。 我从那里安装了 Visual C++ 6.0 + Microsoft Platform SDK 2003 http:// /www.microsoft.com/downloads/en/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en#requirements
我还在工具->选项->下添加了SDK路径目录并将它们移动到顶部。
但我在编译时仍然遇到此错误...
c:\users\admin\downloads\microsoft Visual C++ 6.0 标准版\vc98\include\new(9):致命错误 C1083:无法打开包含文件:“异常”:没有这样的文件或目录
并且
c:\users\admin\downloads\microsoft Visual C++ 6.0 标准版\vc98\include\ios(9):致命错误 C1083:无法打开包含文件:'streambuf':没有这样的文件或目录
有人知道吗?
Hey guys.
I need to compile some project.
I installed Visual C++ 6.0 + Microsoft Platform SDK 2003 from there
http://www.microsoft.com/downloads/en/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en#requirements
I also added SDK paths under Tools->Options->Directories and moved them to top.
But I am still getting this errors when compiling...
c:\users\admin\downloads\microsoft visual c++ 6.0 standard edition\vc98\include\new(9) : fatal error C1083: Cannot open include file: 'exception': No such file or directory
And
c:\users\admin\downloads\microsoft visual c++ 6.0 standard edition\vc98\include\ios(9) : fatal error C1083: Cannot open include file: 'streambuf': No such file or directory
Anyone got some idea?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
根据 您链接到的页面,您链接到的 SDK 已于 2005 年 5 月 2 日发布。
“此 SDK 不支持与 Microsoft Visual C/C++® 6.0 一起使用,因为对 VC 6.0 的支持已经结束。最后一个与 VC 6.0 一起使用的 SDK 是 2003 年 2 月版”
更一般地说,只需阅读相关文档即可。
如果您的计算机太旧而无法使用免费的 Visual Studio Express 10.0,那么我建议使用 Code::Blocks IDE。您可以将其配置为使用任何编译器。包括捆绑在旧 SDK 中的早期 Visual C++ 版本。
干杯&呵呵,,
According to the page you linked to, the SDK you linked to was published 5/2/2005.
"This SDK does not support working with Microsoft Visual C/C++®, 6.0 as support for VC 6.0 has ended. The last SDK that will work with VC 6.0 is the February 2003 Edition"
More generally, just read the documentation of things.
If your machine is too old to use the free Visual Studio Express 10.0, then I suggest using Code::Blocks IDE. Which you can configure to use any compiler. Including, like, an earlier Visual C++ version bundled in an old SDK.
Cheers & hth.,
下载旧编译器版本(如 VC6)的唯一原因是您需要重建为该版本开发的项目。但这段代码显然不是。
尝试使用最新的 Visual C++,2010 作为 Andre评论道。
注意:2003 年 2 月的 SDK 是最后一个与 VC6 兼容的 SDK,可在 MSDN 上找到。
平台 SDK 已经免费很多年了,此帖子并且似乎仍然存在。
The only reason to download an old compiler version like VC6 would be you need to rebuild a project developed for that exact version. But this code clearly isn't.
Try it with the latest Visual C++, which is 2010 as Andre commented.
Note: The Feb 2003 SDK, the last one compatible with VC6, is available on MSDN.
Platform SDKs have been free for quite a few years now, some links are provided in this thread and seem to still be live.
你到底为什么用VC6?如果您使用它,为什么要使用标准库,因为它只有错误的支持?最好下载当前的Express 版本之一。
也就是说,您的包含路径似乎缺少以下内容:“
c:\program files\microsoft Visual Studio\vc98\include\stl\
”或您安装它的位置。Why on earth are you using VC6? And if you use it, why with the standard library, for which it only has buggy support? Better download one of the current Express editions.
That said, it looks as if your include path is missing something like: "
c:\program files\microsoft visual studio\vc98\include\stl\
" or wherever you installed it.我发现在 VC 6 中我经常需要将“.h”添加到包含文件名中。尝试一下看看。
I find that with VC 6 I often need to add ".h" to the include file names. Try it and see.
VC6 是 1998 年的,在 SP5 之前它甚至没有正确的 for 循环。永远不要使用它,它是仍然存在的最标准的不兼容编译器。
VC6 is from 1998, and before SP5 it didn't even get for loops correct. Don't use it, ever, it is the most standard uncompliant compiler that is still out there.