compile problem C++

狂风中的少年 提交于 2019-12-11 23:30:10

问题


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?


回答1:


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 SDK - February 2003 Edition (English) 325 (MB)

File Name: en_platformsdk_win2003.exe

Date Published (UTC): 4/4/2003 9:25:00 PM

Last Updated (UTC): 8/25/2005 9:36:39 PM

SHA1: 33E0434F63EFFC0A04B3401D992AE4478E4C80E7 ISO/CRC: A519A771

Available to Levels: MSDN OS (VL); VS Pro with MSDN Pro (VL); VS Pro with MSDN Premium (Empower); MSDN OS (Retail); Developer AA; VS Pro with MSDN (Retail); MSDN Universal (Retail); VSTS Team Suite (VL); VSTS Architecture (VL); VS Premium with MSDN (MPN); VSTS Test (VL); VS Pro with MSDN Premium (MPN); MSDN Universal (VL); VSTS Database (VL); VS Pro with MSDN Premium (Retail); VSTS Test (Retail); VSTS Development (Retail); VSTS Architecture (Retail); VSTS Team Suite (Retail); VSTS Database (Retail); BizSpark Admin; BizSpark; VS Pro with MSDN Embedded (Retail); VS Pro with MSDN Embedded (VL); VS Test Pro with MSDN (VL); VS Ultimate with MSDN (VL); VS Premium with MSDN (VL); VS Pro with MSDN (VL); VS Test Pro with MSDN (Retail); MSDN Essentials; VS Premium with MSDN (Retail); VS Ultimate with MSDN (Retail); MSDN for Action Pack; VS Ultimate with MSDN (MPN); VS Ultimate with MSDN (NFR FTE);

Platform SDKs have been free for quite a few years now, some links are provided in this thread and seem to still be live.




回答2:


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.,




回答3:


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.




回答4:


I find that with VC 6 I often need to add ".h" to the include file names. Try it and see.




回答5:


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.



来源:https://stackoverflow.com/questions/4887788/compile-problem-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!