Windows下的Objective-C集成开发环境(IDE)的搭建 (二)

Windows下的Objective-C集成开发环境(IDE)的搭建 (二)
?
? ? ? ? ? ?继上一步Windows下的Objective-C集成开发环境(IDE)的搭建 (一)配置运行命令行程序后,今天来讲解一下如何使用
codeblocks配置开发使用cocoa framework开发GUI程序。
?
添加一个main.c文件,将下面的代码拷贝并覆盖main.c中内容#include "AppController.h"
第二步:配置codeblocks,进入Settings->Compiler and Debugger->Gobal compiler setting选项卡中点击“copy”按钮,并将该compiler命令为GNU Compiler Cocoa(可以随意指定),如图:
选择Toolchain executables ,设置compiler's installation directory 为你安装GUNStep的目录,我但前目录为D:\GNUstep,然后配置c compiler ,c++ compiler 等可执行文件,注意这个文件在D:\GNUstep\bin目录下,如图:
注意下图所示的红色区域,一定要选择正确的make可执行文件,在GNUstep\msys\1.0\bin目录下,笔者的目录为D:\GNUstep\msys\1.0\bin\make.exe,配置正确之后,点击OK?右键点击工程“gui”,选择“properties”,在"project setting"中勾选”this is a custom Makefile"复选框,Makefile的名称必须为GNUmakefile, "Execution Directory"选择工程所在文件目录。如图所示
?右键点击工程“gui”,选择“build options”,在debug分支中选择上一步配置好的compiler,即“?GNU Compiler Cocoa",然后在下方的"Make" commands中配置下面的选项,如下所示:
上述步骤完成之后,Antr+F11重新编译工程,如果没有问题的话,会有如下输出:
?

?右键点击工程“gui”,选择“properties”,在"project setting"中勾选”this is a custom Makefile"复选框,Makefile的名称必须为GNUmakefile, "Execution Directory"选择工程所在文件目录。如图所示
