一、在Windows环境下运行GNUstep
1.登陆这个网站http://ftpmain.gnustep.org/pub/gnustep/binaries/windows/
2.下载三个文件
gnustep-msys-system-0.30.0-setup.exe
gnustep-core-0.31.0-setup.exe
gnustep-devel-1.4.0-setup.exe
3.按顺序安装三个文件,并且都要安在同一目录下
4.安装完成后在开始菜单中找到shell打开编译运行
5.用任意编辑器写一个.m后缀的object-c程序测试,以下是例子 hello.m
#import <Foundation/Foundation.h>
int main(int argc,const char *argv[])
{
NSString *s = [[NSString alloc] init];
s = @"Hello, World";
NSLog(s);
[s release];
return 0;
} 在shell中的编译:
执行结果:
二、objective-c和c++的混合编程
Windows下GNUstep安装与Objective-C测试
本文介绍如何在Windows环境下安装GNUstep并配置Objective-C开发环境,包含必要的安装步骤及示例程序,适用于初学者快速上手。
715

被折叠的 条评论
为什么被折叠?



