導航:首頁 > 源碼編譯 > 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怎麼編譯相關的資料

熱點內容
phpsql單引號 瀏覽:84
英雄聯盟壓縮壁紙 瀏覽:450
辦公app需要什麼伺服器 瀏覽:626
安卓伺服器怎麼獲得 瀏覽:806
空調壓縮機冷媒的作用 瀏覽:779
淘寶app是以什麼為利的 瀏覽:655
java提取圖片文字 瀏覽:922
我的世界手機版指令復制命令 瀏覽:33
java判斷字元串為數字 瀏覽:924
androidrpc框架 瀏覽:488
雲伺服器essd和ssd 瀏覽:522
家用網關的加密方式 瀏覽:1
怎麼從ppt導出pdf文件 瀏覽:971
換汽車空調壓縮機軸承 瀏覽:845
平板怎麼登錄安卓端 瀏覽:195
圖像拼接計演算法 瀏覽:255
怎麼打開飢荒伺服器的本地文件夾 瀏覽:291
usb掃描槍編程 瀏覽:673
博易大師手機app叫什麼 瀏覽:663
刮眼影盤解壓方法 瀏覽:966