VS2008 Release 工程调试修改方式:
- 项目 -> 属性 -> C/C++ -> 常规 -> 调试信息格式 -> 用于 “编辑并继续” 的程序数据库(/ZI)
- 项目 -> 属性 -> C/C++ -> 优化 -> 优化 -> 禁用(/Od)
- 项目 -> 属性 -> 链接器 -> debugging -> 生成调试信息 -> 是(/DEBUG)
========================================================================
附录:
使用 XTToolkitPro 界面库或别的静态链接库时时, release 编译设置:
属性 -> c/c++ -> 优化 -> 优化:禁用(/Od)
属性 -> c/c++ -> 优化 -> 内联函数展开:默认值
属性 -> c/c++ -> 代码生成 -> 启用最小重新生成:是(/GM)
否则编译不过去, 会吐出一大堆如 CXTListCtrl 找不到等各种各样恶心的错误. shit!!!
日常琐碎
debug, release, VS2008, 调试
出处: http://blog.csdn.net/hbqhdlc/archive/2009/04/08/4057844.aspx
早就听说 VS2008 出了 SP1 版本了, 想想 SP1 版总应该比 VS2008 更稳定或功能更全面, bug 更少些吧. 因为本来从 XP 升级到 XP SP1 里我就是这样想的, 于是从网上下载了 SP1 安装上去. 开始感觉没什么, 可是到最后接触工作流相关的概念时出现问题了, 在 VS2008 SP1 根本无法使用工作流, 总是提示 “无法加载 C:\document and ……\workflowLibrary1.csproj” 的问题. Google 了很久, 终于发现原来是 SP1 惹的祸, 网上已经有很多人都发现这个问题了.
于是我就是把 SP1 卸载掉, 可是我无论从 “添加/删除程序” 中还是用 “优化大师” 都无能为力, 后来不知道怎么搞的总是出现 “加载安装组件时遇到问题, 取消安装” 的提示, 用 “优化大师” 卸了半天也不行, 于是又 google, 网上仍然有很多答案, 综合下可能有以下几种:
- 第一种方案
- 在 “添加或删除程序” 中的已安装程序列表中检查是否存在 Windows Installer 3.1
- 如果不存在 Windows Installer 3.1, 请完成下列步骤.
- 转到 Windows Installer 3.1 Redistributable (v2), 然后安装 Windows Installer 3.1
- 重试 Visual Studio 2008 安装
这种方法, 我试过了, 因为根本找不到 windows Installer 3.1, 更找不到 Windows Installer 3.1 Redistributable (v2), 至少我在 “添加/删除程序” 里没有, 或是我没找到.
- 第二种方案:
在 “添加/删除程序” 中把窗口上边的 “显示更新” 选中, 于是在 VS2008 目录下就会显示更新, 可能是一个, 也可能是几个, 把这一个或几个更新全部删除掉, 就可以正常安装或卸载 VS2008 了.
附录:
Visual Studio 2008 简体中文正式版序列号(无使用期限限制,正式版)
- 让试用版变成正式版
从Microsoft那下了7个压缩文件分包后,解压后是一个ISO文件。
我用UltraISO编辑了下ISO文件:Setup–>setup.sdb文件提取出来编辑,将
[Product Key]
T2CRQGDKBVW7KJR8C6CKXMW3D
改成
[Product Key]
PYHYPWXB3BB2CCMV9DX9VDY8T
这样,安装的时候就默认是这个正版的序列号了
- 还有一种方法就是,不改这个文件,安装后,再添加删除程序的时候可以输入序列号:
PYHYP-WXB3B-B2CCM-V9DX9-VDY8T
也可以变成正版
技术心得, 日常琐碎
VS2008
-
- General
Additional Include Directories:
C:\WINDDK\2600\inc\wxp
C:\WINDDK\2600\inc\ddk\wxp
C:\WINDDK\2600\inc\ddk\wdm\wxp
C:\WINDDK\2600\inc\crt
Debug Information Format : Program Database (/Zi)
- Optimization
Enable Intrinsic Functions: Yes (/Oi) … To avoid the memcmp compile error.
- Preprocessor
Preprocessor Definitions:
_X86_=1
i386=1
_WIN32_WINNT=0×0501
WINVER=0×0501
WIN32_LEAN_AND_MEAN=1 … dont know if this does much for a device driver
Ignore Standard Include Path:Yes (/X)
- Code Generation
Enable C++ Exceptions:No … no exception handling in the kernel!
Buffer Security Check:No (/GS-) … linker error if set to Yes
Basic runtime Checks: Default
- Advanced
Calling Convention:__stdcall (/Gz)
- Language
Enable Run-Time Type Info:No (/GR-) … linker error if set to Yes
- Input
Additional Dependencies:int64.lib ntoskrnl.lib hal.lib … etc.
Ignore All Default Libraries:Yes (/NODEFAULTLIB)
- Manifest File
Generate Manifest:No
- System
SubSystem:Native (/SUBSYSTEM:NATIVE)
Driver:Driver (/DRIVER)
- Advanced
Base address:0×10000
Entry Point:DriverEntry
Target Machine:MachineX86 (/MACHINE:X86)
Randomized Base Address:Default
Data Execution Prevention (DEP) : default
- General
Additional Library Directories:C:\WINDDK\2600\lib\wxp\i386
Enable Incremental linking: No (/INCREMENTAL:NO)
Output file: $(OutDir)\$(ProjectName).sys
- Command line
add there /safeseh:no option
I’ll give you what I found, but all I can say is don’t do it.
There are always problems linking one version of the CRT against a version of a compiler that it wasn’t written for.
Create a win32 DLL project.
C/C++ settings for VC2008
阅读全文…
内核编程, 技术心得
filedisk, QuickSYS, romfs, sfilter, VS2008, 驱动
近期评论