OBJECT-C Environment Construction under iOS development-windows

Source: Internet
Author: User

No Mac at hand, start learning object-c, and only build the OBJECT-C build environment under Windows.

Download the required software: http://www.gnustep.org/experience/Windows.html

Install Gnustep-msys-system,gnustep-core,gnustep-devel,gnustep-cairo;

Install in turn, direct default Next, the first two are required, after the two optional, my following;

After the installation is complete, the default path is: C:\GNUstep;

New HELLOWORLD.M File:

#import <Foundation/Foundation.h>int main (charChar* argv[]) {    NSLog (@ "HelloWorld");     return 0 ;}

Put HELLOWORLD.M in the home directory: Detailed address: C:\GNUstep\msys\1.0\home\Yeyinqiu, bold parts for their own PC name, each person is different;

Create a new gcc.sh file, put in the same directory as the code (directly knocking at the two lines of command is also OK, is troublesome), note the bold part is the code file name:

#!/bin/-fconstant-string-class=nsconstantstring-c helloworld.m-i/gnustep/system/ library/-o helloworld helloworld.o-l/gnustep/system/library/libraries/-lobjc-lgnustep-base  . /helloworld.exe

Run the shell,Windows7 and the following version, will be in the Start menu, all Programs, the new Gnustep->shell, directly open,windows8 generally do not generate (I found a half a day not found);

In fact, the main corresponding shell boot path is msys.bat this file: C:\GNUstep\msys\1.0\msys.bat; Double-click the file to open the Shell window;

Run the./gcc.sh command (that is, the Linux command):

Look, the results are printed and the Helloworld.exe executable is generated in this directory.

The first HelloWorld is completed.

OBJECT-C Environment Construction under iOS development-windows

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.