我剛剛在Windows XP Professional SP3上安裝了Windows SDK 7.1。現在我正在檢查安裝是否正常,並且已經有問題了。我仍然無法從Windows SDK 7.1命令提示符中獲取cl.exe編譯簡單的hello world C++代碼。下面是命令提示輸出的快照:Windows SDK 7.1命令提示符LNK1104
Setting SDK environment relative to C:\Program Files\Microsoft SDKs\Windows\v7.1\.
Targeting Windows XP x86 Debug
C:\Program Files\Microsoft SDKs\Windows\v7.1>cd /d "D:\My Documents\Sources"
D:\My Documents\Sources>cl /EHsc /FeD:\Target\hello hello.cpp
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
hello.cpp
Microsoft (R) Incremental Linker Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
LINK : fatal error LNK1104: cannot open file 'C:\Documents'
我試圖移動到hello.cpp
d:\並結束了相同的結果。另一方面,CSC.exe在同一命令提示符下編譯了一個hello world C#代碼,沒有出現問題。我現在應該怎麼做?
請注意,我沒有安裝任何版本的Visual Studio。我安裝了Windows SDK,以便我可以在Qt Creator中使用Qt Framework 4.8.0 for VS2010,並在SharpDevelop中學習一些C#。