Is it possible to do GUI programming using Objective-C on Windows?
I am noticing that GNUstep contains headers for AppKit, which are found at /GNUstep/System/Library/Headers/AppKit.
Should I install Project Center for that? Is there a way to write the GUI code by hand?
EDIT:
I just want to build simple utility GUI app.
Here's the code I wrote:
#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;
}
And I got this error:
$ 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
I want to do this since I don't have a Mac and don't want to buy one, and my target platform is Windows.
Yes, it is possible. Check the following links
http://www.gnustep.it/nicola/Tutorials/index.html
http://www.gnustep.it/nicola/Tutorials/WindowsAndButtons/index.html
To write code you can use notepad or 'Gemas' - a lightweight editor, which can be downloaded from the following link.
http://ftp.gnustep.org/pub/gnustep/binaries/windows/
include this library for linking
-lgnustep-gui
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With