win7环境使用vc6的常见问题解决方法

本文针对使用VC6编译器过程中遇到的典型问题提供了详细的解决方案,包括无法打开工程、编译警告C4655和错误C1092等,并附带示例代码帮助理解。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1, 不能打开工程 点击打开出现错误;

解决vc6 link 卡死和装上visual assitX不能打开和添加文件的办法就是打上官方的原版VC6sp6补丁。下载地址如下:

英文版地址:http://download.microsoft.com/download/1/9/f/19fe4660-5792-4683-99e0-8d48c22eed74/Vs6sp6.exe

简体中文版地址: http://download.microsoft.com/download/e/c/9/ec94a5d4-d0cf-4484-8b7a-21802f497309/Vs6sp6.exe


2, one or more files are out of date , would you rebuild?


网上介绍了修改系统时间,对文件加空格,之类的方法, 自己试用了下, 都不管用;

在project->setting->里面的选项页都设置成了reset(默认设置), 也许是之前修改很多, 也就乱套了。

修改之后还是依然有问题, 针对于这个问题往往是程序结构体的问题, 还需要进一步的确认,

warning C4656: 'xxxxxxxxxObj' : data type is new or has changed since the latest build, or is defined differently elsewhere

主要是C4656这个问题会导致以下的错误。

请参考:

https://technet.microsoft.com/zh-CN/library/aa260823.aspx#vc6ed_cont_tips


Unused Data Types, Even If They Were Defined at Build Time

Some data types in your source code, such as C++ classes, are undefined in the running application if a variable of the data type was not declared in the source code when the executable was built. The unused data type is excluded from the executable by the linker to save disk and memory space. If you add a new variable of such a data type to a function while debugging, and invoke Edit and Continue, the data type will be undefined, and the following warning and error will occur:


大意是: 在你编译时外部的一个类或者一个结构体加入了新的成员,这时就提示你重新编译;我的工程程序比较大, 不太理解,也不好查找,我自己写了一个简单代码:

#include "Test.h"

typedef struct  Point
{
int x;
int y;
//int c;
};

int main()
{


int  a = 3;
int  b = 4;

Point pt;

}


在调试过程,如果解开//int c;的注释, 就会出现warning C4656,  error C1092的错误。




Compiling...
EC_Demo.cpp
C:\Src\EC_Demo.cpp(10) : warning C4655: 'pListClass' : variable type is new 
since the
latest build, or is defined differently elsewhere
C:\Src\EC_Demo.cpp(14) : fatal error C1092: New data types and function 
prototypes are 
not supported by Edit and Continue; build required
Error executing D:\vs98\VC98\BIN\cl.exe.

Edit and Continue - 1 error(s), 1 warning(s)




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值