Release 的问题

Release编译工程出错:

 

错误1:
Error 268 Command line error D8022 : cannot open 'c://db-4.3.29/build_win32/Release/RSP00005B22365916.rsp' cl excxx_access (经常出错)
未见一下两种:

Error 261 Could not delete file 'c://db-4.3.29/build_win32/Release/vc90.idb'.
Make sure that the file is not open by another process and is not write-protected. excxx_env excxx_env
Error 275 general error c1010096: Failed to process the response files. The system cannot find the file specified. Manifest Tool ex_lock

 

Solution(貌似):

 

Tools -> Options -> Project and Solutions -> Build and Run ->
maximum number of parallel project builds == 1. 

 

警告1:

WINVER not defined. Defaulting to 0x0502 (Windows Server 2003)

 

solution:


 

 

 

 

 

编译的时候老出现:WINVER not defined. Defaulting to 0x0502 (Windows Server 2003)

WINVER not defined. Defaulting to 0x0502 (Windows Server 2003)

把一个程序从VC6下移植到VS2005环境下:
提示
WINVER not defined. Defaulting to 0x0502 (Windows Server 2003)

由于使用的是WINDOWSXP的系统

解决:
在stdafx.h中
#define WINVER 0x0501

Visual Studio 2005 移植 - WINVER,warning C4996, error LINK1104

一、WINVER
Compile result:
WINVER not defined. Defaulting to 0x0502 (Windows Server 2003)

windows server 2003
winver>=0x0502

windows xp
winver>=0x0501

windows 2000
winver>=0x0500

windows nt 4.0
winver>=0x0400

windows me
winver>=0x0500

windows 98
winver>=0x0410

windows 95
winver>=0x0400


二、编译警告:warning C4996 与 Security Enhancements in the CRT
将过去的工程用VS2005打开的时候。你有可能会遇到一大堆的警告:warning C4996。
比如:
warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use

_CRT_SECURE_NO_WARNINGS. See online help for details.
warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation,

use _CRT_SECURE_NO_WARNINGS.
原因是Visual C++ 2005使用了更加安全的run-time library routines。
新的Security CRT functions(就是那些带有“_s”后缀的函数):
http://msdn2.microsoft.com/en-us/library/wd3wzwts(VS.80).aspx
那么如何搞定这些警告呢:
方法一:将原来的旧函数替换成新的Security CRT functions。
方法二:用以下方法屏蔽这个警告。
1.在预编译头文件stdafx.h里(注意:一定要在没有include任何头文件之前)定义下面的宏:
#define _CRT_SECURE_NO_DEPRECATE
2.#param warning(disable:4996)
3.更改预处理定义:
项目->属性->配置属性->C/C++ -> 预处理器 -> 预处理器定义,增加_CRT_SECURE_NO_DEPRECATE
方法三:方法二没有使用新的更安全的CRT函数,显然不是一个值得推荐的方法,可是你又不想一个一个地改,那么还有一个更方便的方法:
在预编译头文件stdafx.h里(同样要在没有include任何头文件之前)定义下面的宏:
#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 1
在链接的时候便会自动将旧函数替换成Security CRT functions。
注意:这个方法虽然使用了新的函数,但是不能消除警告(原因见红字),你还得同时使用方法二。。。


三、link error 1104
原因:当从vc6移植到.net时,会导致这个链接错误!
解决:项目属性->配置属性->链接器->输入->忽略特定库,加入libcd.lib;或直接在命令行中加入: /nodefaultlib:"libcd.lib"
注意:是否是libcd.lib,与C/C++属性中的“代码生成”选项相关

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值