[Tool] using sublime text development objective-c

Source: Internet
Author: User


[Tool] using sublime text development objective-c Preface


With the iphone hot, the objective-c used to develop the iphone app has slowly become one of the hottest programming languages. This article describes how to develop objective-c in the Windows operating system through the sublime Text tool, allowing developers who have no budget to purchase Mac devices to learn the syntax of OBJECTIVE-C. Keep a record for yourself, and hope to help developers in need.





Install Python


Before you can compile objective-c in the Windows operating system, you must install Python and then install GNUstep. The Python installer can be downloaded from the Python website.


    • https://www.python.org/







Installing GNUstep


After loading python, install GNUstep, and then compile the objective-c through GNUstep. GNUstep installation program can be downloaded from the GNUstep official website, but in order to simplify the installation procedures, through the following URL to obtain the packaged GNUstep compressed file "gnustep.7z", directly unzip to C: The installation is completed.


    • Https://github.com/sol-prog/ClangGNUstepobjective-cfor Windows








However, because the installation is done through GNUstep compressed files, it is necessary to manually "c:\gnustep\bin", "c:\gnustep\gnustep\system\ tools"these two gnustep paths into the Windows system variable path. ( remember to restart)






GNUstep after installation, you also need to "objective-c.gnustep-build.bat" the following files, add GNUstep directory path "c:\gnustep\msys\1.0\", Used to tell GNUstep how to compile objective-c.


    • Click here to download: Objective-c.gnustep-build.bat




Install Sublime Text


After loading the GNUstep, and then installing sublime text, you can then compile the OBJECTIVE-C program code through sublime text. and sublime text installation program, can be downloaded from the sublime text website.


    • http://www.sublimetext.com/








Sublime text after installation, you also need to "objective-c.sublime-build" the following files, add Sublime text directory path "c:\users\%username%\appdata\roaming\ Sublime text 2\packages\user", used to tell Sublime text to compile objective-c using GNUstep.


    • Click here to download: Objective-c.sublime-build




Development Objective-c


After completing the installation steps, open sublime Text, enter the following OBJECTIVE-C program code, and save the file with the extension ".m". (The file path cannot contain Chinese )


#include <Foundation/Foundation.h>

int main(){
    @autoreleasepool{
        NSLog( @"\n\n Hello Objective-C by Clark \n\n");
    }
    return 0;
}


Then in the System menu "\tool\build system\", check the use of objective-c.






Later, you can compile and execute the OBJECTIVE-C by using the shortcut key "ctrl+b".





Reference data


Clang and objective-c on Windows-solarian Programmer



[Tool] using sublime text development objective-c


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.