导航:首页 > 源码编译 > vs2010怎么编译

vs2010怎么编译

发布时间:2022-01-26 01:35:21

⑴ vc2010怎么进行c语言编译

1,在windows桌面中Visual Studio打开软件并新建项目。

⑵ 如何在VS2010中运行编译C和C++

VS2010 需要先建立工程,然后在工程中添加cpp文件,再编写代码,然后编译运行才可以,给您个图吧:
1。首先新建项目

2。从左边找到Visual C++ 在中间找到你要建立的项目,一般回事空项目

3。分别在源文件、头文件添加你要添加的东西,新建项就是新建空文件,现有项就是添加已经写好的源文件

4。这个是新建项的截图

5。写完代码 就可以 调试运行了。 至于一些调试技巧你可以网络“VS2010调试技巧”

⑶ VS2010中怎么编译成EXE啊

请先确认是一个完整的工程,然后直接F7,再点一串"确定"就可以了,然后到和代码同一目录下的Debug文件夹或者Release文件夹里面去找就可以了,至于那个SLN文件,是VS2010的工程文件,既然已经有这个文件了,就说明工程已经建立好了,您就可以直接按F7进行编译了

⑷ 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'
.......

⑸ VS2010如何编译

看图

⑹ vs2010怎么编译源代码

我估计你是编译那个按钮都不能点,是这样的,VS和VC有个很大的区别,VS需要被编译的对象必须形成一个PROJECT才行,意思就是,你直接打开一个CPP的文件,绝对是编译不了,只能先建立一个工程,再把文件加进去,然后编译的时候是编译整个工程。具体操作大概就是文件菜单里点新建,然后选择源代码对应的项目,建一个空的项目,再把源代码文件添加进去或者开始写

⑺ 请问用vs2010学习版如何编译c语言程序

刚好我也是用VS,有一个人专门写了一个它的使用方法,网址底下·
至于怎么创建C,
你按照那个人说的设置了后,点新建,项目WIN32,输入名称,然后再资源管理器那,点右键,添加,新项目,选C++文件,然后命名注意了,要写NAME.C,这样就是C的程序。。好像说的麻烦了,不懂可以加我然后问我。。
http://hi..com/%5F%E2%64%5F%B7%B3%5F%DE%B2%C2%D2/blog/category/%A1%B6visual%20c%2B%2B%202010%C8%EB%C3%C5%BD%CC%B3%CC%A1%B7

⑻ vs2010如何编译单个CPP文件。

可以明确的告诉你,无此种编译器存在,编译文件不光光是看源文件,各个工程中还有很多的配置文件存在,如果不建立工程,任何编译器都是无法知道你到底是要编译控制台程序,windows程序,或者是DLL。所以还不存在。

⑼ vs2010怎么编译

VS2010里有很多种语言VC++、C#、VB等,编译都是在菜单里有“生成”,其实就是编译。

⑽ 如何使用Visual Studio2010编译C语言

使用Visual Studio2010编译C语言的具体步骤如下:

1、首先双击打开Vs 2010,找到左上角的新建项目并点击打开,选择win32控制台程序,给文件命名,如123,单击确定。

阅读全文

与vs2010怎么编译相关的资料

热点内容
神兽领域安卓怎么下载 浏览:250
单片机交通灯ad原理图 浏览:413
多功能解压磁铁笔 浏览:80
少儿编程火箭升空 浏览:401
兰斯10游戏解压码 浏览:42
手机proxy服务器地址 浏览:449
吉他清音压缩 浏览:301
简历模板程序员 浏览:882
螺杆压缩机虚标型号 浏览:953
idea开发项目服务器ip地址 浏览:125
串口服务器出现乱码怎么解决 浏览:950
命令按钮的default 浏览:161
战网如何登录其他服务器 浏览:990
中国银行app如何关闭短信 浏览:493
nx120编程技巧 浏览:722
手机也能使用源码公式 浏览:918
怎样把压缩的文件下载 浏览:335
pdf是哪的 浏览:27
群晖服务器如何建立自己数据库 浏览:868
win10怎么查找服务器地址 浏览:506