Establish an objective-C development environment in Windows

Source: Internet
Author: User

On the InternetArticleMany of them planned to have a fun game two days ago. As a result, the black apple test failed. The main reason is that the configuration is not enough. The memory must have at least 4 GB to barely OK ...... I bought Acer 4726 GB more than three years ago. At that time, I felt that the cost was good and I had to buy it. Although I have never used it for repair, the heat dissipation is really not good, therefore, it is recommended that you pay more for a commercial machine.

 

The following is my general Configuration:

 

For setting up the OC development environment, I will record my successful test cases here. Of course, we recommend that you buy a Mac if you still have a point, but I want to buy a second-hand one. I don't know if any friends in the garden are doing this business? If you have a shout, thank you.

I. Installation

What should I prepare?

You need to download the four software packages from the gnustep Official Website:Gnustep msys System,Gnustep Core,Gnustep devel,Cairo backendThen install the SDK in the order from top to bottom. The default installation path is c: \ gnustep. You can also change the installation path.

Here I want to talk about: 1. Are you sure you want to install it in sequence? I'm in order. If you try it, it's not in order.

2. Can I install it on another path on the Internet? I tried to install it on drive D, but it was unsuccessful.

What are these four items? What is the purpose?

Generally, gnustep is an open source program for implementing the openstep interface. It aims to provide a cross-platform object-oriented program development environment.

How to install?

Click Next.

How do I know if the installation is successful?

Click Start> AllProgram"-> Gnustep-> Shell

You will see this page: the first step is successful.

Ii. Encoding

Use editplus, notepad ++ ............ And write a helloword as follows:

# Import <Foundation/Foundation. h> int main (INT argc, const char * argv []) {ngutoreleasepool * Pool = [[ngutoreleasepool alloc] init]; nslog (@ "Hello world! "); [Pool drain]; return 0 ;}

Name "helloworld. m" (case sensitive) and cut the file to the "C: \ gnustep \ home" folder.

 

Iii. Compilation Code

First switch to drive C

Then convert to the home folder where the file is stored:

Run the red box statement:

"Gcc-fconstant-string-class = nsconstantstring-C helloworld. M-I/gnustep/system/library/headers" is a bit difficult.Now we can copy the data to the inset

Press enter to execute the statement. If there is no change, congratulations, you are on the road to success. If there are any statements, you have to go back and check again to see if there is a mistake. Now you can see that the home folder contains an additional file "helloworld. O"

The next step is the real compilation.

"GCC-O helloworld. O-L/gnustep/system/library/libraries/-lobjc-lgnustep-base"Note: space and order

Mark of successful compilation: helloworld.exe is generated in the home directory of drive C.

Compile "./helloworld.exe" directly in the last step"

Let's take a look at our success:

 

Before buying a Mac, you can also practice writing code in object-C using the CD command to enter the directory where. m is located, and then execute the compilation

 

 

Author: Pepe
Source: http://pepe.cnblogs.com/
The copyright of this article is shared by the author and the blog Park. You are welcome to repost this article. However, you must retain this statement without the author's consent and provide a clear link to the original article on the article page. Otherwise, you will be held legally liable.

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.