http://blog.csdn.net/ldl22847/article/details/7482971

http://www.cnblogs.com/qingyuan/p/3524791.html

codeblock编译Object-C

Windows平台Objective-C编译环境搭建

安装codeblocks

安装GnuStep MSYS System(最小GNUlinux系统)、GnuStep core、GnuStep devel

配置codeblocks使得能够编译objective-c

1.   Codeblocks

http://www.codeblocks.org/downloads/binaries

The codeblocks-13.12mingw-setup.exe file includes the GCC compiler and GDB debugger from TDM-GCC (version 4.7.1, 32 bit). The codeblocks-13.12mingw-setup-TDM-GCC-481.exe file includes the TDM-GCC compiler, version 4.8.1, 32 bit. While v4.7.1 is rock-solid (we use it to compile C::B), v4.8.1 is provided for convenience, there are some known bugs with this version related to the compilation of Code::Blocks itself.

第一个不带编译器和调试器,第二个包含gcc编译器和TDM-GCC 4.7.1的gdb调试器,第三个包含4.8.1的TDM-GCC编译器。

这里,我们下载codeblocks-13.12mingw-setup.exe这个稳定版本。

2.   GnuStep套件安装

这里我们只安装 GnuStep MSYS,GnuStep Core,GnuStep Devel

http://www.gnustep.org/experience/Windows.html

GnuStep是一个基于MinGw系统包含最基本的Gnu System on windows和MinGw库。

The GNUstep Windows installer is based on the MinGW system and consists of the basic MSYS and MinGW libraries, other library dependancies and the GNUstep Core packages (gnustep-make, gnustep-base, gnustep-gui, and gnustep-back.) The installer installs GNUstep onto most varieties of Windows (see below for tested installations) and sets up the computer to make it easy to run GNUstep applications. It was created with the NSIS installer.

         

http://ftpmain.gnustep.org/pub/gnustep/binaries/windows/gnustep-msys-system-0.30.0-setup.exe

GNUstep MSYS System         类似于cygwin的GnuStep最小系统

This installer is the first of two installers needed to get GNUstep running on Windows. The second installer is GNUstep Core (gnustep-core-X.X.X-setup.exe).  You should install this installer first and then install gnustep-core. If you want to compile programs you also need to install gnustep-devel.

 

http://ftpmain.gnustep.org/pub/gnustep/binaries/windows/gnustep-core-0.34.0-setup.exe

http://ftpmain.gnustep.org/pub/gnustep/binaries/windows/gnustep-devel-1.4.0-setup.exe

开发必须

libtool, autoconf and pkg-config

GnuStep develop tool

a)         Objective-C

3.   codeblocks配置

配置编译器

Settings->Compiler->copy rename as objective-c

勾选调试 –g 和编译警告 –Wextra

增加编译参数Setting Other options

-fconstant-string-class=NSConstantString -std=c99

连接器设置

增加2个链接库

E:\GNUstep\GNUstep\System\Library\Libraries\libgnustep-base.dll.a

E:\GNUstep\GNUstep\System\Library\Libraries\libobjc.dll.a

搜索目录配置

指定搜索目录Searchdirectories(需要预先安装好GNUstep)

E:\GNUstep\GNUstep\System\Library\Headers

E:\GNUstep\GNUstep\System\Library\Libraries

文件后缀支持

添加Objective-C文件类型支持

Settings->Environment  File extension handling

进入 Project->Projecttree->Edit file types & categories... ,在Sources, 下面添加*.m到文件类型列表中。如图:

进入Settings->Editor...,选择 Syntaxhighlighting,点击“Filemasks....”按钮,在弹出框尾部添加*.m 到文件类型。如图:

关键字列表

 点击“Keywords...”按钮 (紧靠Filemasks...按钮) 添加下面Object-C的关键字到EditKeywords列表中。如图。

@interface   @implementation @end  @class @selector @protocol @public @protected   @private id BOOL YES NO SEL nil  NULL self

点击“Keywords...”按钮 (紧靠Filemasks...按钮) 添加下面Object-C的关键字到EditKeywords列表中。如图。

@interface   @implementation @end  @class @selector @protocol @public @protected   @private id BOOL YES NO SEL nil  NULL self

4.    创建工程示例

#import <Foundation/Foundation.h>

int main (int argc, const char *argv[])

{

NSAutoreleasePool *pool =[[NSAutoreleasePool alloc] init];

NSLog(@"%@",@"hello world-test");

NSString *name = @"hihi";

NSLog(@"123abc:%@",name);

NSLog(@"12nihao:%@",name);

printf("Hello world!\n");

[pool drain];

return 0;

}

注意:

1、  右键源文件rename为.m文件

2、  右键option,勾选compile file,link file

参考网址:

http://blog.csdn.net/ldl22847/article/details/7482971

codeblock编译Object-C的更多相关文章

  1. codeblock 编译googletest

    1.cmake安装 2.codeblock  16.01 3.Google Test 1.7.0 4.PATH路径添加(重启电脑,保证设置的PATH路径生效) 5.python安装 6.编译安装:   ...

  2. Linux c codeblock的使用(二):在工程中编译多个文件

    (一)前言 我们刚开始学习linux c的时候,一般都是在一个c文件里面写完所有程序,然后用gcc编译这个c文件就好了,十分简单. 但是你有没有想过,如果我们希望将不同模块的代码放到不同的c文件,然后 ...

  3. 解决codeblock不能运行的问题

    codeblock 编译失败 软件 IDE codeblock这软件的确不错,但是除此安装使用就会不小心入坑.你是不是满心欢喜的下载好codeblock,敲入代码,点击运行的时候却总是没反应呢? 如果 ...

  4. Linux c codeblock的使用(三):使用函数库

    (一)概念 什么是函数库呢?一下子说概念大家可能不太熟悉,但是这实际上是大家在windows系统上经常见到的东西.没错,就是那些后缀为DLL的文件. linux上实际也有自己的函数库文件,文件类型为. ...

  5. MinGW下编译openssl, json-c

    目的:在windows环境下,编译开源库openssl 环境:windows 10 ,Mingw及自带msys工具,openssl-1.0.2j 工具主要使用MinGW(含msys1.0), IDE选 ...

  6. Object C学习笔记6-如何在Windows环境搭建Object C开发环境

    1. 安装编译环境 Object C和其他很多语言一样,都需要有一个编译器.Object C 是在GCC下编译的.GCC(GNU Compiler Collection,GNU编译器集合),是一套由 ...

  7. 如何在Windows环境搭建Object C开发环境

    1. 安装编译环境 Object C和其他很多语言一样,都需要有一个编译器.Object C 是在GCC下编译的.GCC(GNU Compiler Collection,GNU编译器集合),是一套由 ...

  8. 对于谷歌开源的TensorFlow Object Detection API视频物体识别系统实现教程

    本教程针对Windows10实现谷歌近期公布的TensorFlow Object Detection API视频物体识别系统,其他平台也可借鉴. 本教程将网络上相关资料筛选整合(文末附上参考资料链接) ...

  9. 安装运行谷歌开源的TensorFlow Object Detection API视频物体识别系统

    Linux安装 参照官方文档:https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/inst ...

随机推荐

  1. /-- Encapsulated exception ------------\ java.lang.NoSuchMethodException: com.sjzdaj.po.Class.setN_id([Ljava.lang.String;)

    转自:http://ruinxdgzy.iteye.com/blog/805138

  2. Python核心编程读笔 11:模块

    第12章 模块 1.基本概念 模块的文件名就是模块名字.py 每个模块都定义了自己唯一的名称空间 模块的搜索路径:会被保存在 sys 模块的 sys.path 变量里 >>>sys. ...

  3. 无法下载图片 App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file

    刚学线程通信,提示: 2016-01-27 11:11:02.246 20-9 gcd3 communicationOfThread[5193:298643] App Transport Securi ...

  4. 转 git操作小结

    UNDER MIT LICENSE. 公司几乎所有的项目都是使用 git 仓库来管理代码,以前对 git 只有些肤浅的了解,每次提交代码或者上线的时候总是会提心吊胆,生怕出现一些未知的问题.经过三个月 ...

  5. 搜索服务器xunsearch实现

    安装方法:   centos 6.6 64位   histroy:   12  cd /srv/   13  wget http://www.xunsearch.com/download/xunsea ...

  6. 第6章 堆排序,d叉堆,优先队列

    #include<stdio.h> #include<stdlib.h> #include<string.h> #define leftChild(i) (2*(i ...

  7. 使用Unity开发HoloLens应用

    https://developer.microsoft.com/en-us/windows/holographic/install_the_tools 导读:开发者们在陆续收到HoloLens开发者版 ...

  8. KPI考核

    编辑 本词条缺少名片图,补充相关内容使词条更完整,还能快速升级,赶紧来编辑吧! KPI考核,Key Performance Indicator的缩写,指的是关键绩效指标考核法. 中文名 KPI考核 外 ...

  9. JAVA并发,BlockingQuene

    BlockingQueue也是java.util.concurrent下的主要用来控制线程同步的工具. BlockingQueue有四个具体的实现类,根据不同需求,选择不同的实现类1.ArrayBlo ...

  10. 利用RTE创建自定义软件安装包(一)

    说明:鉴于MDK5.0推出的新功能,安富莱电子顺势推出几期MDK5.0新功能的使用方法.MDK5.0提供的RTE功能还是很不错的,这个功能一方面方便用户创建自己常用的驱动文件包,还有一个很重要的功能就 ...