是否有可能在Windows上使用objective-c进行GUI编程?
我注意到GNUstep包含在这里find的AppKit
头文件/GNUstep/System/Library/Headers/AppKit
我应该安装Project Center
吗?是否有效? 如果有办法用手写GUI代码?
EDIT:
我只是想构build简单的实用GUI应用程序。
这是我写的代码:
#import <Cocoa/Cocoa.h> int main(void) { NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; NSView* myView = [[[NSView alloc] initWithFrame:NSMakeRect(10, 10, 100, 100)]autorelease]; [pool release]; return 0; }
我得到了:
$ gcc `gnustep-config --objc-flags` *.m -L /GNUstep/System/Library/Libraries -lobjc -lgnustep-base HelloGUI.m: In function 'main': HelloGUI.m:7:10: warning: unused variable 'myView' C:\Users\mhewedy\AppData\Local\Temp\ccvUXAIj.o:HelloGUI.m:(.data+0xa58): undefined reference to `__objc_class_name_NSView' collect2: ld returned 1 exit status
The reasons I want to develop this app on windows is:
谢谢。
对的,这是可能的。 检查以下链接
http://www.gnustep.it/nicola/Tutorials/index.html
http://www.gnustep.it/nicola/Tutorials/WindowsAndButtons/index.html
要编写代码,你可以使用记事本或“Gemas” – 一个轻量级的编辑器,可以从下面的链接下载。
包括这个链接库
-lgnustep-gui