Objective-C windows Development Environment setup

Source: Internet
Author: User

In the past two days, I want to see how the legendary iPhone application is made.

Taking this idea as a preliminary attempt, the first problem encountered was the establishment of the Development Environment on Windows. After all, it was just fun to buy a Mac and it was too impulsive. After all, there was already a local database, I still don't know how long the heat will last.

 

The establishment of Windows-based objective-C development and running environment can use a series of components provided by gunstep.

Four software packages are mainly used:

Gnustep msys System

Gnustep Core

Gnustep devel

Cairo backend

Gunstep official website http://wwwmain.gnustep.org/experience/Windows.html

The installation sequence is also as follows. To separate it from OS, I installed the gunstep package to D:/gnustep.

 

Then we can write a hello World program to test whether helloworld. m is set up in the environment.

# Include <stdio. h> <br/> int main (void) <br/>{< br/> printf ("Hello world! "); <Br/> return 0; <br/>}< br/>

 

Below we compile and run helloworld. m respectively (save path D:/iworkspace)

Compile

1. Choose Start> All Programs> gunstep> shell to pop up mingw32 :~ Window

In this shell, general Linux commands should be supported. I tried a few commands, which are easy to use.

$ Pwd

/Home/Administrator: the installation directory D:/gnustep/home/Administrator

 

2. Go to the directory of our helloworld. M file.

$ Cd d:/iworkspace

$ Ls

Helloworld. m

 

3. Enter the GCC command to compile the code.

$ Gcc-O helloworld. m

PS: The-O parameter is used to specify the name of the program to be generated.

 

$ Ls

Helloworld.exe helloworld. m

Helloworld.exe is the compiled executable file.

 

Run

Helloworld.exe is also executed in the shellwindow

$./Helloworld

Hello world!

So far, our initial goal has been completed and the environment has been set up successfully.

01:25:26

 

 

 

 

 

 

 

 

 

Related Article

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.