編譯器報錯:`error C2146: syntax error : missing ';' before identifier 'Developer'`、`error C2501: 'Microsoft' : missing storage-class or type specifiers`、`fatal error C1004: unexpected end of file found`。
檔案內容為 **Microsoft Developer Studio Workspace File (Format Version 6.00)**,即 `.dsw` 工作區檔案,**非 C++ 原始碼**。你可能在專案中錯誤地將 `.dsw` 加入編譯項目,或嘗試直接編譯此檔。
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "FPMOM"=".\FPMOM.dsp" - Package Owner=...
...
# 這是專案管理檔案,記錄專案路徑、相依性、建置設定等
| 副檔名 | 用途 | 可編譯 |
|---|---|---|
| `.dsw` | 工作區檔案 (Workspace) | 否 |
| `.dsp` | 專案檔案 (Project) | 否 (由 IDE 讀取) |
| `.cpp` / `.c` / `.cxx` | C++ 原始碼 | 是 |
| `.h` / `.hpp` | 標頭檔 | 否 (被 include) |
| `.rc` | 資源腳本 | 否 (資源編譯器處理) |
這是**工作區檔案**,不是原始碼。請在 VC++ 6.0 IDE 中開啟 `.dsw` 或 `.dsp` 進行建置,不要嘗試編譯它。