您的位置:首页 > 移动开发 > Objective-C

Play Objective-c with GNUstep in windows

2011-02-25 22:33 295 查看
Use NS (NeXtStep) Object in source.m, like:

NSString *hello = @"Hello World!";//a NS string object


creat a file in the folder where source.m at,named "GNUmakefile" with code:

include $(GNUSTEP_MAKEFILES)/common.make
TOOL_NAME = appname
appname_OBJC_FILES = source.m
include $(GNUSTEP_MAKEFILES)/tool.make


- in console -

compile with command : make

run the app with command: ./obj/appname

source.m
#include<stdio.h>
#include<Foundation/Foundation.h>
int main(void){
NSString *helloString = @"Hello World!";
printf("%s/n",[helloString cString]);
return 0;
}


get info = > Hello World!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: