2)選中 Project,右鍵,選擇“Add files”,將 c/c++ 和 head files 加入工程。
3) 選中 Project,右鍵,選擇“Properties”,“Project settings”選項卡中的“Makefile”填入Makefile 文件名,並勾選“This is a custom Makefile”。
4)選中 Project,右鍵,選擇“Build options”,刪除“"Make" command”選項卡中所有的“$target”。
注意:新建文件Makefile,注意在CodeBlocks中,TAB符默認爲4個空格,4個空格的TAB符會導致make
-f Makefile時 報錯,錯誤信息:***missing separator. stop,必須更改默認設置,打開Settings->Editor->General settings,在TAB options中勾選Use TAB character,保存後編寫Makefile內容