1. 程式人生 > >【C++】error LNK2019: 無法解析的外部符號 [email protected

【C++】error LNK2019: 無法解析的外部符號 [email protected

原因:c語言執行時找不到適當的程式入口函式

解決:對於控制檯應用程式 1.選單中選擇 Project->Properties, 彈出Property Pages視窗

2.在左邊欄中依次選擇:Configuration Properties->C/C++->Preprocessor,然後在右邊欄的Preprocessor Definitions對應的項中刪除_WINDOWS, 新增_CONSOLE.

3.在左邊欄中依次選擇:Configuration Properties->Linker->System,然後在右邊欄的SubSystem對應的項改為CONSOLE(/SUBSYSTEM:CONSOLE)