1)“File -> New -> Project”,選擇“Empty Project”或者“console application“並創建。
2)選中 Project,右鍵,選擇“Add files”,將 c/cpp 和 head files 加入工程。
3)選中 Project,右鍵,選擇“Properties”,“Project settings”選項卡中的“Makefile”填入Makefile 文件名,並勾選“This is a custom Makefile”。
4)選中 Project,右鍵,選擇“Build options”,刪除“"Make" command”選項卡中所有的“$target”。
5)修改已有的Makefile,使輸出路徑為codeblocks默認路徑,否則會一直提示你沒有build