VS2012英文版 编译驱动程序的环境设置
2013-04-26 12:48
260 查看
VS2012英文版编译驱动程序的环境设置
WDK版本为7600.16385.1,本例中WDK安装在C:\WinDDK上
一、驱动check版本,也即Debug版本的设置
1.使用 “开始菜单+Pause” 快捷键,或右键 我的电脑-->属性-->高级-->
环境变量-->Administrator的用户变量,设置:
WDKPATH=C:\WinDDK\7600.16385.1
2.用VS20128创建一个Win32控制台应用程序,勾选 Additional options: Empty project
3.将编写好的源代码文件导入项目,右键 项目名 选择 Add-->Existing Item
4.修改项目属性,右键 项目名 选择 Properties-->Configuration Properties
(1)
C/C++-->General:
Additional Include Directories =
$(WDKPATH)\inc\ddk;
$(WDKPATH)\inc\api;
$(WDKPATH)\inc\crt
Debug Information Format = C7 Compatible (/Z7)
Warning Level = Level 4 (/W4)
C/C++-->Preprocessor:
Preprocessor Definitions = WIN32=100;_X86_=1;WINVER=0x500;DEG=1
Ignore Standard Include Path = Yes(/X)
C/C++-->Code Generation:
Enable Minimal Rebuild = No
Basic Runtime Checks = Default
Runtime Library = Multi-threaded Debug (/MTd)
Security Check = No (/GS-)
C/C++-->Advanced:
Calling Convention = __stdcall (/Gz)
Compile As = Compile as C Code (/TC)
(2)
Linker-->General:
Output File = $(OutDir)$(TargetName).sys
Enable Incremental Linking = No (/INCREMENTAL:NO)
Additional Library Directories = $(WDKPATH)\lib\wxp\i386
Linker-->Input:
Additional Dependencies = ntoskrnl.lib;wdm.lib;fltlib.lib;fltMgr.lib
Ignore All Default Libraries = Yes (/NODEFAULTLIB)
Linker-->Manifest File:
Generate Manifest = No
Enable User Account Control (UAC) = No
Linker-->Debugging:
Generate Map File = Yes (/MAP)
Map File Name = $(TargetDir)$(TargetName).map
Linker-->System:
SubSystem = Native (/SUBSYSTEM:NATIVE)
Stack Reserve Size = 4194304
Stack Commit Size = 4096
Driver = Driver (/DRIVER)
Linker-->Advanced:
Entry Point = DriverEntry
Set Checksum = No
Base Address = 0x10000
Randomized Base Address = Yes (/DYNAMICBASE)
Data Execution Prevention (DEP) = Yes (/NXCOMPAT)
Target Machine = MachineX86 (/MACHINE:X86)
Linker-->Command Line:
Additional options =
/SECTION:INIT,D /IGNORE:4078 /safeseh:no
设置该项可以避免以下错误提示:
LINK : warning LNK4078: multiple 'INIT' sections found with different attributes (E2000020)
LINK : error LNK2001: 无法解析的外部符号__load_config_used
5.右键单击项目,选择 Rebuild
二、驱动free版本,也即Release版本的设置
右键 项目名 选择 Properties-->Configuration Properties
(1)
C/C++-->General:
Additional Include Directories = $(WDKPATH)\inc\ddk;
$(WDKPATH)\inc\api;$(WDKPATH)\inc\crt
Debug Information Format = Program Database (/Zi)
Warning Level = Level 4 (/W4)
C/C++-->Preprocessor:
Preprocessor Definitions = WIN32=100;_X86_=1;WINVER=0x500;DEG=1
Ignore Standard Include Path = Yes(/X)
C/C++-->Code Generation:
Enable Minimal Rebuild = Yes (/Gm)
Basic Runtime Checks = Default
Runtime Library = Multi-threaded (/MT)
Security Check = No (/GS-)
Enable Function-Level Linking = Yes (/Gy)
C/C++-->Advanced:
Calling Convention = __stdcall (/Gz)
Compile As = Compile as C Code (/TC)
(2)
Linker-->General:
Output File = $(OutDir)$(TargetName).sys
Enable Incremental Linking = No (/INCREMENTAL:NO)
Additional Library Directories = $(WDKPATH)\lib\wxp\i386
Linker-->Input:
Additional Dependencies = ntoskrnl.lib wdm.lib fltlib.lib fltMgr.lib
Ignore All Default Libraries = Yes (/NODEFAULTLIB)
Linker-->Manifest File:
Generate Manifest = No
Enable User Account Control (UAC) = No (/MANIFESTUAC:NO)
Linker-->Debugging:
Generate Debug Info = No
Generate Map File = Yes (/MAP)
Map File Name = $(TargetDir)$(TargetName).map
Linker-->System:
SubSystem = Native (/SUBSYSTEM:NATIVE)
Stack Reserve Size = 4194304
Stack Commit Size = 4096
Driver = Driver (/DRIVER)
Linker-->Advanced:
Entry Point = DriverEntry
Set Checksum = Yes (/RELEASE)
Base Address = 0x10000
Randomized Base Address = Yes (/DYNAMICBASE)
Data Execution Prevention (DEP) = Yes (/NXCOMPAT)
Target Machine = MachineX86 (/MACHINE:X86)
Linker-->Command Line:
Additional options = /SECTION:INIT,D /IGNORE:4078 /safeseh:no
设置该项可以避免以下错误提示:
LINK : warning LNK4078: multiple 'INIT' sections found with different attributes (E2000020)
LINK : error LNK2001: 无法解析的外部符号__load_config_used
WDK版本为7600.16385.1,本例中WDK安装在C:\WinDDK上
一、驱动check版本,也即Debug版本的设置
1.使用 “开始菜单+Pause” 快捷键,或右键 我的电脑-->属性-->高级-->
环境变量-->Administrator的用户变量,设置:
WDKPATH=C:\WinDDK\7600.16385.1
2.用VS20128创建一个Win32控制台应用程序,勾选 Additional options: Empty project
3.将编写好的源代码文件导入项目,右键 项目名 选择 Add-->Existing Item
4.修改项目属性,右键 项目名 选择 Properties-->Configuration Properties
(1)
C/C++-->General:
Additional Include Directories =
$(WDKPATH)\inc\ddk;
$(WDKPATH)\inc\api;
$(WDKPATH)\inc\crt
Debug Information Format = C7 Compatible (/Z7)
Warning Level = Level 4 (/W4)
C/C++-->Preprocessor:
Preprocessor Definitions = WIN32=100;_X86_=1;WINVER=0x500;DEG=1
Ignore Standard Include Path = Yes(/X)
C/C++-->Code Generation:
Enable Minimal Rebuild = No
Basic Runtime Checks = Default
Runtime Library = Multi-threaded Debug (/MTd)
Security Check = No (/GS-)
C/C++-->Advanced:
Calling Convention = __stdcall (/Gz)
Compile As = Compile as C Code (/TC)
(2)
Linker-->General:
Output File = $(OutDir)$(TargetName).sys
Enable Incremental Linking = No (/INCREMENTAL:NO)
Additional Library Directories = $(WDKPATH)\lib\wxp\i386
Linker-->Input:
Additional Dependencies = ntoskrnl.lib;wdm.lib;fltlib.lib;fltMgr.lib
Ignore All Default Libraries = Yes (/NODEFAULTLIB)
Linker-->Manifest File:
Generate Manifest = No
Enable User Account Control (UAC) = No
Linker-->Debugging:
Generate Map File = Yes (/MAP)
Map File Name = $(TargetDir)$(TargetName).map
Linker-->System:
SubSystem = Native (/SUBSYSTEM:NATIVE)
Stack Reserve Size = 4194304
Stack Commit Size = 4096
Driver = Driver (/DRIVER)
Linker-->Advanced:
Entry Point = DriverEntry
Set Checksum = No
Base Address = 0x10000
Randomized Base Address = Yes (/DYNAMICBASE)
Data Execution Prevention (DEP) = Yes (/NXCOMPAT)
Target Machine = MachineX86 (/MACHINE:X86)
Linker-->Command Line:
Additional options =
/SECTION:INIT,D /IGNORE:4078 /safeseh:no
设置该项可以避免以下错误提示:
LINK : warning LNK4078: multiple 'INIT' sections found with different attributes (E2000020)
LINK : error LNK2001: 无法解析的外部符号__load_config_used
5.右键单击项目,选择 Rebuild
二、驱动free版本,也即Release版本的设置
右键 项目名 选择 Properties-->Configuration Properties
(1)
C/C++-->General:
Additional Include Directories = $(WDKPATH)\inc\ddk;
$(WDKPATH)\inc\api;$(WDKPATH)\inc\crt
Debug Information Format = Program Database (/Zi)
Warning Level = Level 4 (/W4)
C/C++-->Preprocessor:
Preprocessor Definitions = WIN32=100;_X86_=1;WINVER=0x500;DEG=1
Ignore Standard Include Path = Yes(/X)
C/C++-->Code Generation:
Enable Minimal Rebuild = Yes (/Gm)
Basic Runtime Checks = Default
Runtime Library = Multi-threaded (/MT)
Security Check = No (/GS-)
Enable Function-Level Linking = Yes (/Gy)
C/C++-->Advanced:
Calling Convention = __stdcall (/Gz)
Compile As = Compile as C Code (/TC)
(2)
Linker-->General:
Output File = $(OutDir)$(TargetName).sys
Enable Incremental Linking = No (/INCREMENTAL:NO)
Additional Library Directories = $(WDKPATH)\lib\wxp\i386
Linker-->Input:
Additional Dependencies = ntoskrnl.lib wdm.lib fltlib.lib fltMgr.lib
Ignore All Default Libraries = Yes (/NODEFAULTLIB)
Linker-->Manifest File:
Generate Manifest = No
Enable User Account Control (UAC) = No (/MANIFESTUAC:NO)
Linker-->Debugging:
Generate Debug Info = No
Generate Map File = Yes (/MAP)
Map File Name = $(TargetDir)$(TargetName).map
Linker-->System:
SubSystem = Native (/SUBSYSTEM:NATIVE)
Stack Reserve Size = 4194304
Stack Commit Size = 4096
Driver = Driver (/DRIVER)
Linker-->Advanced:
Entry Point = DriverEntry
Set Checksum = Yes (/RELEASE)
Base Address = 0x10000
Randomized Base Address = Yes (/DYNAMICBASE)
Data Execution Prevention (DEP) = Yes (/NXCOMPAT)
Target Machine = MachineX86 (/MACHINE:X86)
Linker-->Command Line:
Additional options = /SECTION:INIT,D /IGNORE:4078 /safeseh:no
设置该项可以避免以下错误提示:
LINK : warning LNK4078: multiple 'INIT' sections found with different attributes (E2000020)
LINK : error LNK2001: 无法解析的外部符号__load_config_used
相关文章推荐
- MTK平台编译环境设置
- 安卓Android ROM定制、移植,安卓软件反编译、汉化实战教程第三篇:厨房环境Cygwin设置。
- Visual Studio 2008 + Visual Assist X的CUDA2.3编译环境设置(转)
- VC6+WDK+DriverStudio编译Windows驱动程序环境搭建
- 配置VC++6.0下驱动程序编译环境的步骤
- unbuntu 下android(MT6573) 编译环境设置
- 在vs2012的编译环境下使用openssl
- cocos2d-x在VS2012环境下编译的异常
- windows环境下用vs2012实现lua5.3.1的编译
- linux设置编译环境、补丁、查找、nfs技巧
- linux编译源码问题 环境变量的设置
- Qtwebkit配置,设置交叉编译环境 - croop520的专栏 - 博客频道 - CSDN.NET
- VS2010编译环境一些选项的设置(总结)
- 在VC6.0下设置Unicode编译环境
- 在VC6.0下设置Unicode编译环境
- Windows下Linux开发环境设置--安装Cygwin及交叉编译工具链
- VC6+WDK+DriverStudio编译Windows驱动程序环境搭建
- Sublime text2 C/C++ 编译环境设置
- maven java编译环境的设置
- vs2005 .net 2.0 csc.exe的编译环境变量设置(配置)