当前位置:首页 » 编程软件 » vs2008编译驱动

vs2008编译驱动

发布时间: 2022-06-02 15:28:16

1. VS2008在一个工作空间,同时开发和编译MFC程序和驱动程序能实现吗

可以实现。
新增一个项目,选择:添加到现有解决方案
或 增加 一个 现有的解决方案

即可.

2. 急:Win7装VS2008或VS2010编译不能通过

BUG 你用的VS2008是RTM版的,如果文件系统不对就会产生这种情况,必须是NTFS的系统 才可以……但是微软已经解决了这个问题,去安装VS2008 SP1,
就OK了,还有,win7文件系统最好用NTFS的,不要用FAT了,别的软件有时也会有麻烦,比如mysql!而且装了SP1之后,你就可以用C++ TR1里面的新特性如 hash_map等,SP1全面支持,TR1,升级吧···

3. vs2010如何编译驱动

1、安装VS2010,安装WDK 7.0(DDK);

2、新建VC++->Empty Project

3、打开Configuration Manager 并新建一个名称为“ dirver ”的Solution Configuration 并将“dirver” 设为Active Solution Configuration .

4、打开View-> property Manager。

5、在"dirver" solution configuration 上点击右键,选择Add new property Sheet。取名为“dirverProperty”. 并对他进下以下设置。

5.1. C\C++ - General - Debug Information Format = Program Database (/Zi)
5.2. C\C++ - Preprocessor - Preprocessor Definitions = _X86_ [add also DBG for Debug config]
【WIN32;_DEBUG;_X86_;i386;STD_CALL;CONDITION_HANDLING;WIN32_LEAN_AND_MEAN;NT_UP;SRVDBG;DBG;_IDWBUILD;_WIN32_WINNT=0x0400;% (PreprocessorDefinitions)】
5.3. C\C++ - Code Generation - Enable C++ Exceptions = No
5.4. C\C++ - Code Generation - Basic Runtime Checks = Default
5.5. C\C++ - Code Generation - Buffer Security Check = No (/GS-)
5.6. C\C++ - Advanced - Calling Convention = __stdcall (/Gz)
5.7. C\C++ - Advanced - Compile As = Compile as C Code (/TC) [if you are going to use plain C]
5.8. Linker - General - Output File = $(OutDir)\$(ProjectName).sys
5.9. Linker - General - Enable Incremental Linking = Default
5.10. Linker - Input - Additional Dependencies = ntoskrnl.lib hal.lib $(NOINHERIT) [add here needed libs here e.g. ntoskrnl.lib hal.lib]
【不知道上面是不是笔误,应该为:ntoskrnl.lib;hal.lib;%(AdditionalDependencies)】
5.11. Linker - Input - Ignore All Default Libraries = Yes (/NODEFAULTLIB)
5.12. Linker - Manifest File - Generate Manifest = No
5.13. Linker - System - SubSystem = Native (/SUBSYSTEM:NATIVE)
5.14. Linker - System - Driver = Driver (/DRIVER)
5.15. Linker - Advanced - Entry Point = DriverEntry
5.16. Linker - Advanced - Base Address = 0x10000
5.17. Linker - Advanced - Randomized Base Address = Disable (/DYNAMICBASE:NO)
【这个也是错误的:应该置空】
5.18. Linker - Advanced - Data Execution Prevention (DEP) = Disable (/NXCOMPAT:NO)
【这个也是错误的:应该置空】

6. Config VC++ Directories
6.1 Open Open up property manager by clicking on Menu View->Property Manager.
6.2 Expand the project node and then the Configuration|Platform nodes, you will see "Microsoft.cpp.<Platform>.users" file for each Configuration|Platform. These are the files

for the global settings, similar to the old tools/Options/VC++ Directories.
6.3 Multi-Select "Microsoft.cpp.<Platform>.users", right click and bring up the property page window
6.4 In the property page window, click on "VC++ Directories" (for example) in the left pane, add new paths for the directories such as "Include Directories". separated by

semicolons
(eg:Include Directories config As:
$(ddkroot)\INC
$(ddkroot)\INC\WNET
$(ddkroot)\INC\DDK\WNET
Library Directories config As:
$(ddkroot)\LIB\WNET\I386
)
6.5 Make sure to save the settings before shutting down Visual Studio.
6.6 Re-launch Visual Studio and the new settings will be in effect.
6.7 Note: If you would like to only change the settings for one project, you can right click on the project and bring up the property page. Change the settings for “VC++

Directories”, these settings will be persisted to the project file.
七. OK. Have done. Now you can test it with simple code, e.g.:

#include "ntddk.h"

NTSTATUS
DriverEntry(PDRIVER_OBJECT DriverObject,PUNICODE_STRING RegistryPath)
{
return STATUS_UNSUCCESSFUL;
}

特别说明:
1.
Visual Studio 2010 在智能设备开发方面只支持Windows Phone OS 7.0。如果你要为Windows CE 5.0和Windows Mobile 6.5开发应用程序,请安装Visual Studio 2008。
2.
做驱动开发时,SDK的版本要和WDK的版本一致,即Win7 WDK要配Win7 SDK,否则会出现编译错误。VS2010里集成了Windows SDK 7.0A。
3.
如果出现类似如下编译错误,解决方法是:拷贝C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\sal.h,然后覆盖掉C:\WinDDK\7600.16385.1\inc\api\sal.h。

C:\Program Files\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(550): error C2143: syntax error : missing ')' before 'const'
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\crtdefs.h(550): error C2143: syntax error : missing '{' before 'const'
.......

4. vs2008里必须有main函数吗可以不用吗

VC的话不管什么编译器都是需要一个入口函数的 win32的工程一般是main函数 MFC的工程会是WinMain函数 dll的工程会是DllMain函数 而驱动的话一般是DriverEntry函数

5. 用VS2008制作安装程序,制作的这个安装程序里面一个已经是打好包的驱动程序,怎么让他在执行安装呢

您好,这样的情况建议您下载最新版本的驱动精灵,或是直接在线升级一下驱动精灵。希望可以帮到您。

6. VC6.0和VS2008编译总是出错!

应该是你以前安装的版本没有彻底删除,还有信息遗留在注册表中,所有导致你重新安装也没有效果。
可以在vc中更改头文件的路径,也可以用另外一个帐号来使用vc

热点内容
java返回this 发布:2025-10-20 08:28:16 浏览:705
制作脚本网站 发布:2025-10-20 08:17:34 浏览:968
python中的init方法 发布:2025-10-20 08:17:33 浏览:676
图案密码什么意思 发布:2025-10-20 08:16:56 浏览:828
怎么清理微信视频缓存 发布:2025-10-20 08:12:37 浏览:737
c语言编译器怎么看执行过程 发布:2025-10-20 08:00:32 浏览:1076
邮箱如何填写发信服务器 发布:2025-10-20 07:45:27 浏览:308
shell脚本入门案例 发布:2025-10-20 07:44:45 浏览:188
怎么上传照片浏览上传 发布:2025-10-20 07:44:03 浏览:875
python股票数据获取 发布:2025-10-20 07:39:44 浏览:829