Objective-C Now it's almost Apple's patent , It can be directly in Apple's Xcode Compiled on Objective-C Program , But in Windows There are very few compiler tools under the platform , Not many people use this language . I saw someone posting on the Internet today , Can be in Windows Compiling under the platform Objective-C, I tried with curiosity . little does one think , It's a success , Now how to build Objective-C I'd like to share my experience with you .

1、 install GNUstep
GNUstep Windows Installer Provides Windows Under the platform Object-C Simulation development environment for , There are four packages , among GNUstep System and GNUstep Core It's a must ,GNUstep Devel and Cairo Backend It's optional . Just install the first two .

2、 To write Objective-C Code
After installation , In the start menu GNUstep In the options shell, You can open the command line . Directly in Windows I'm going into C:/GNUstep/home/Administrator( My is Administrator, There may be some differences ) Catalog , Use your favorite tool here ( Now? UltraEdit and Notepad++ The editor seems to be able to highlight the code ) To write Object-C Program .
Such as :HelloWorld.m

#import <Foundation/Foundation.h>
 
 int main (int argc, const char *argv[]) {
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    NSLog(@"Hello World!");
    [pool drain];

return 0;
}

3、 Configure environment variables
This is an important step .GNUstep.sh It's used to set up GNUstep Development environment variables , If not implemented , There will be a lot of header files , The library files , Command not found

After writing the source code in a directory , Write a make The configuration file , The name must be GNUmakefile, The content is

include $(GNUSTEP_MAKEFILES)/common.make

TOOL_NAME=Test
Test_OBJC_FILES=HelloWorld.m

include $(GNUSTEP_MAKEFILES)/tool.make

You can change the bold part above

Then is
make

If the command runs successfully, you can see a new one obj Catalog , There are executable files and .o file .

OK done .

How to be in Windows Compiled on Objective-C More articles about

  1. How to be in windows Compiled on Chromium (CEF3) And add MP3 Support ( Two )

    A year later , Compile again cef3, The only purpose is still to join mp3 Support . The new version of the compilation environment and considerations have changed , So record it again . One . Compiled version cef The format of the version number is X.YYYY.A.gHHHHHHH X Main edition ...

  2. Build Slic3r on Windows // How to be in Windows Compiled on Slic3r

    download Strawberry Perl 5.22 64bit The green version , Unzip to a place , such as C Packing list , such as C:\strawbrry-perl-5.22.2.1-64bit-portable download Boos ...

  3. [ZZ] stay windows Compiled on Mesa3d opengl32 library

    stay windows Compiled on Mesa3d opengl32 library cheungmine http://blog.csdn.net/ubuntu64fan/article/details/8061475 Mesa ...

  4. How to be in WINDOWS Compile below BOOST C++ library .

    How to be in WINDOWS Compile below BOOST C++ library cheungmine 2008-6-25   Write out , I'm afraid I'll forget later , Also for beginners reference . Use VC8.0 and boost1.35.0.   1) download boost ...

  5. stay Mac/Linux/Windows Compiled on corefx Problems encountered and solutions

    These two days try to Mac/Linux/Windows Compile on three platforms .NET The cross platform Troika (coreclr/corefx/dnx) One of the corefx(.NET Core Framework), Results the compilation of the three platforms ...

  6. ( turn ) How to be in Windows Install more than one MySQL

    original text :http://www.blogjava.net/hongjunli/archive/2009/03/01/257216.html How to be in Windows Install more than one MySQL This article is about installing version of mys ...

  7. Redis Brief introduction and how to use Windows Installation on Redis

    Redis brief introduction Redis Is a very fast non relational memory database . Redis Provides Java,C/C++,C#,PHP,JavaScript,Perl,Object-C,Python,Ruby,Erla ...

  8. How to be in Windows To build Android development environment

    Android Development is getting hotter and hotter , A lot of kids are learning Android Development , Study Android The first task of development is to build Android development environment , Because of you The main truth is Windows On the development Android, Let's give you more details ...

  9. utilize openssl Management certificate and SSL Schedule No 2 part : stay Windows Compiled on openssl

    utilize openssl Management certificate and SSL Schedule No 2 part : stay Windows Compiled on openssl First mingw Environment construction of , Be sure to follow the following : http://blog.csdn.net/ubuntu64fan/ar ...

Random recommendation

  1. solve Qualcomm Atheros AR8161 Gigabit Ethernet network card Linux It's a broken problem

    My Dell (Dell)I2330R-168 After upgrading a kernel version, the network card of all-in-one computer , The network card broke down after a while ifconfig eth0 eth0: flags=<UP,BROADCAST,RUNNING, ...

  2. JavaDate class

    stay JDK1.0 in ,Date Class is the only class that represents time , But because of Date Class is not easy to implement internationalization , So from JDK1.1 Version start , Recommended Calendar Class for time and date processing . Here is a brief introduction Date The use of the class . ...

  3. Programming paradigm epesode7,8 stack Store pointer types and heap,register

    This section goes from the back to the front . ____stack and heap ___stack from Assembly language control management , Data first in and then out . The stack is where local variables are stored , When a function calls a child function , This function takes up more space in the stack , It's used to store the local variables of a subfunction ...

  4. C# winform Call the browser to open the page method to share , Hopefully that helped

    In many client programs, we need to call the browser to open the web page , Here's one that can be shared with me winform The program calls the browser's method , The test passed . Statement : This method has been tested by tens of thousands of users , It's not that I share it without passing the test , That's moving by yourself ...

  5. Who says JavaScript ordinary ?

    Here are some Javascript Tips and pitfalls that beginners should know . If you're already an expert , By the way, let's review . Javascript It's just a programming language . How could it be wrong ? 1. Have you tried to sort a set of numbers ? Jav ...

  6. ajax and jquery Using skills

    1. Use ajax You can use u Method to get the connection , It's safer :alert When you pop up, you need single quotation marks and double quotation marks, and Firefox will report an error !

  7. Mysql Use , frequently-used SQL sentence

    One . start-up mysql service start-up mysql service : systemctl start mysqld.service root The user login mysql: modify root password : alter user 'root'@'l ...

  8. Xenserver And HA Realization -NFS The implementation of the

    Environmental Science : stay vm We've got one on the table Xenserver The server , a centos7 virtual machine ( Used to do NFS Storage , Because of the realization of HA Need shared storage ), The network connection mode is bridge mode echo '- - -'>> /sys/ ...

  9. Java - &quot;JUC Thread pool &quot; ThreadPoolExecutor Principle analysis

    Java Multithreading series --“JUC Thread pool ”02 And Thread pool principle ( One ) ThreadPoolExecutor brief introduction ThreadPoolExecutor Is the thread pool class . For thread pools , It can be understood as " save ...

  10. Excel In this paper, the linear programming is solved

    Excel In this paper, the linear programming is solved ( Here's the picture ) 1. Set the target output cell ( Blue line ) 2. Set the independent variables in the objective function of the linear programming model ( Red line ) 3. Set constraints ( Black line ) 4  If the independent variable in the objective function is required to be a non negative number , Check green ...