安装错误:
错误:vc6不让安装出现 [16位Windows子系统]
c:/windows/system32/Autoexec.NT.系统文件不适用于运行MS-DOS与Microsoft Windows应用程序。选择“关闭”终止应用程序。
解决办法:插入2000/xp的安装盘到光驱中,在Dos提示符下面分别执行如下命令(系统安装在C:光驱为E:)
xp下
expand e:/i386/config.nt_ C:/windows/system32/config.nt
expand e:/i386/autoexec.nt_ C:/windows/system32/autoexec.nt
expand e:/i386/command.co_ C:/windows/system32/command.com
2000下
expand e:/i386/config.nt_ C:/winnt/system32/config.nt expand e:/i386/command.co_ C:/winnt/system32/command.com //--------------------------------------- 错误:setup was unable to create a DCOM user account in order to register valec.exe 然后提示安装失败 解决办法:这是Visual Studio的一个BUG,只出现在Windows 2000/XP下。如果你不使用Visual Studio Analyzer,可以在安装时选择Custom,然后在Enterprise Tools中清除掉Visual Studio Analyzer。再安装就没有这个问题了。 //--------------------------------------- 错误:D:/aaa/temp1.cpp(14) : error C4226: nonstandard extension used : 'far' is an obsolete keyword
expand e:/i386/autoexec.nt_ C:/winnt/system32/autoexec.nt
如果一定要使用Visual Studio Analyzer,可以在安装后在进行配置工作,参考微软的Knowledge Base的文章:“Q257413 BUG: Visual Studio "Setup Was Unable to Not Create a DCOM User A”。
在 32 位的 C/C++ 里面这个关键字没有用了
如果用 VC 编译会出错,用 Borland C 编译会忽略这个关键字,虽然不出错,因为已经失去作用了。
在 32 位的程序里面,直接去掉这个 far 就可以了
如果你还想保留这个 far 信息,可以用大写的 FAR 代替, 这个 FAR 是空的,什么也不做的,只是可以看出原来有个 far 在这,已经被去掉了。
//---------------------------------------
错误:d:/100/text1.cpp(17) : error C2065: 'clrscr' : undeclared identifier
解决办法:VC++中没有C语言里面的clrscr,所以要用别的函数代替,代替的函数为system("clr")
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
编译错误:
错误:Compiling with DDK compiler...
HelloApp.cpp
HelloWdm.cpp
C:/Program Files/Compuware/DriverStudio/DriverWorks/include/vdw.h(37) : fatal error C1189: #error : NTVERSION symbol must be defined to one of the following: 400, 'WDM'
Error executing cl.exe.
HelloApp.exe - 1 error(s), 0 warning(s)
解决办法:在PROJECT的setting内的C/C++选项卡下修改Preprocessor definitions:下的设置添加NTVERSION=_WDM_
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
连接错误:
错误:LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
解决办法:单击Project Settings对话框的Link选项卡,全部删除/Subsystem:windows或console开关,VC++的Developer Studio 将自动创建WIN32应用或WIN32控制台。
//---------------------------------------
错误:xxx.obj : error LNK2001: unresolved external symbol _Direct3DCreate8@4
解决办法:程序开始初加入#pragma comment(lib,"d3d8.lib"),重新连接
//---------------------------------------
错误:nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
解决办法:单击Project Settings对话框的General选项卡,选择use MFC in a static library