Visual Studio 命令提示字元 (2010)

Visual Studio 2010 Express提供了一個簡單的C++編譯環境:『Visual Studio 命令提示字元 (2010)』。
開啟後的終端機環境中可以用『cl』命令來編譯連結一般的C++程式。如:

cl hello.cpp

glut的程式(在glut有正確安裝後)也可以直接編譯。
不過如果要編譯WIN32的程式,在命令列則要加上kernel32.lib,user32.lib,gdi32.lib等額外的程式庫以供連結:

cl hello-win.cpp kernel32.lib user32.lib gdi32.lib /FeHelloWin.exe

Tags: 

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.