驱动开发的几种编译环境配置法(转)
2009-12-10 14:46
465 查看
转链接:
http://www.vcfans.com/2009/07/windows-driver-compiler-link-config.html
很不错,值得收藏!
英文版
/ /How to Configure Visual Studio 2008 for Compiling Drivers
Setup Visual Studio 2008.
Setup DDK (WDK).
Add to VS paths DDK include files, libs and bins.
Create new empty "Win32 project" and add source file (i.e. HelloWorld.c).
Configure project properties (All Configurations):
C/C++ - General - Debug Information Format = Program Database (/Zi)
C/C++ - Preprocessor - Preprocessor Definitions = _X86_ [add also DBG for Debug config]
C/C++ - Code Generation - Enable C++ Exceptions = No
C/C++ - Code Generation - Basic Runtime Checks = Default
C/C++ - Code Generation - Buffer Security Check = No (/GS-)
C/C++ - Advanced - Calling Convention = __stdcall (/Gz)
C/C++ - Advanced - Compile As = Compile as C Code (/TC) [if you are going to use plain C]
Linker - General - Output File = $(OutDir)/$(ProjectName).sys
Linker - General - Enable Incremental Linking = Default
Linker - Input - Additional Dependencies = ntoskrnl.lib hal.lib $(NOINHERIT) [add needed libs here e.g. ntoskrnl.lib hal.lib]
Linker - Input - Ignore All Default Libraries = Yes (/NODEFAULTLIB)
Linker - Manifest File - Generate Manifest = No
Linker - System - SubSystem = Native (/SUBSYSTEM:NATIVE)
Linker - System - Driver = Driver (/DRIVER)
Linker - Advanced - Entry Point = DriverEntry
Linker - Advanced - Base Address = 0x10000
Linker - Advanced - Randomized Base Address = Disable (/DYNAMICBASE:NO)
Linker - Advanced - Data Execution Prevention (DEP) = Disable (/NXCOMPAT:NO)
#include "ntddk.h"
NTSTATUS
DriverEntry(PDRIVER_OBJECT DriverObject,PUNICODE_STRING
RegistryPath)
{
return STATUS_UNSUCCESSFUL;
}
http://www.vcfans.com/2009/07/windows-driver-compiler-link-config.html
很不错,值得收藏!
英文版
/ /How to Configure Visual Studio 2008 for Compiling Drivers
Setup Visual Studio 2008.
Setup DDK (WDK).
Add to VS paths DDK include files, libs and bins.
Create new empty "Win32 project" and add source file (i.e. HelloWorld.c).
Configure project properties (All Configurations):
C/C++ - General - Debug Information Format = Program Database (/Zi)
C/C++ - Preprocessor - Preprocessor Definitions = _X86_ [add also DBG for Debug config]
C/C++ - Code Generation - Enable C++ Exceptions = No
C/C++ - Code Generation - Basic Runtime Checks = Default
C/C++ - Code Generation - Buffer Security Check = No (/GS-)
C/C++ - Advanced - Calling Convention = __stdcall (/Gz)
C/C++ - Advanced - Compile As = Compile as C Code (/TC) [if you are going to use plain C]
Linker - General - Output File = $(OutDir)/$(ProjectName).sys
Linker - General - Enable Incremental Linking = Default
Linker - Input - Additional Dependencies = ntoskrnl.lib hal.lib $(NOINHERIT) [add needed libs here e.g. ntoskrnl.lib hal.lib]
Linker - Input - Ignore All Default Libraries = Yes (/NODEFAULTLIB)
Linker - Manifest File - Generate Manifest = No
Linker - System - SubSystem = Native (/SUBSYSTEM:NATIVE)
Linker - System - Driver = Driver (/DRIVER)
Linker - Advanced - Entry Point = DriverEntry
Linker - Advanced - Base Address = 0x10000
Linker - Advanced - Randomized Base Address = Disable (/DYNAMICBASE:NO)
Linker - Advanced - Data Execution Prevention (DEP) = Disable (/NXCOMPAT:NO)
#include "ntddk.h"
NTSTATUS
DriverEntry(PDRIVER_OBJECT DriverObject,PUNICODE_STRING
RegistryPath)
{
return STATUS_UNSUCCESSFUL;
}
相关文章推荐
- 驱动开发的几种编译环境配置法----PS:我孤陋寡闻了。。。。反省啊。。。。
- 驱动开发的几种编译环境配置法
- 驱动WDK7600在VC6.0下的编译开发配置环境
- 驱动WDK7600在VC6.0下的编译开发配置环境
- Linux + ARM驱动开发环境配置(内核配置与编译)
- Android系统开发编译环境配置
- VC6.0 +WDK 开发驱动的环境配置
- VS2005、vs2008+WinXPDDK+DDKWizard配置驱动开发环境
- WINDOWS 7 配置驱动开发环境(wdk7.60)
- VC6.0+WDK7600编译开发配置环境
- FB4.5 模型驱动开发环境配置
- Linux驱动开发环境配置(内核源码树构造)
- Win10下VS2015(WDK10)驱动开发环境配置
- VirtualBox下安装已经配置好Linux驱动开发环境的Ubuntu系统的方法
- Android系统开发编译环境配置
- c++:eclipse 开发c++环境配置(保你编译成功)
- Ubuntu下简单配置反编译工具以及其开发环境
- 在EditPlus中配置Perl开发编译环境
- vs2008 驱动开发环境配置
- WINDOWS 7 配置驱动开发环境(wdk7.60)