Objective-C on Windows? Yes, you can!

Objective-C is an OOP language often used on the Macintosh, including the Cocoa API of Mac OS X. And, since 2007, Obj-C is used for developing iOS devices applications.

However, to learn and develop in Objective-C, you are not obliged to procure a Macintosh. Actually, there is a free implementation of OpenStep framework (developed by Apple) called GNUstep, which is, multiplatform and works under GNU/Linux as well as Microsoft Windows.

In this tutorial I will guide you through the necessar steps, to ensure you get your own Objective-C code on Windows to work.

  1. Download and install the environment

Go to the GNUstep project official website, under the Download section, download the complete environment for compiling and running GNUstep.

The environment is composed of four packages, as shown below :


PS : Download the packages and install them in order. GNUstep MSYS System first, GNUstep core second, GNUstep Devel and finally Cairo Backend.

Thus, during installation, be sure to keep the default settings. For example, the setup wizard would implicitly place the files in C: GNUstep

      2. Your first script.. Hello World

Once you finish installing packages, you can start programming in Objective-C :]

Create a directory in a location of your choice to put in your project. As for me, I put all under D: in a directory called MyProject.

  • Notepad++ .. My lovely editor

On Windows, the best software tool, in my opinion, to code in Objective-C.

Download it here, never mind, you will never regret it ;]

Let’s go back to our project directory. You will create two files in there, the first file will be used to compile the project and to generate the executable, and the other will contain our first Hello World program test.

Let’s go, open up Notepad++ and create the first file, call it GNUmakefile and put in the following code:

PS : Be sure to save the file with the extension (*. Mak) or just choose All types (*. *).

Now for the second file, call it main, since it is the main file of your project, then put in this code:

Save it with the name main.m (. M is the extension of the implementation files for Objective-C). But before, make sure you pick Objective-C from the language menu as shown below:


The work is almost finished, it remains to execute our project 😉

Open up your console (Shell) provided by the GNUstep environment, Start Menu-> GNUstep-> Shell.


For those who are already familiar with Linux, they should not get lost 😉

Enter the path to your project directory, mine was: D :/ MyProject, therefore, in the command line, it is :

So far so good, you now pointing in your project directory, now type the command make to compile.

If everything goes fine, you should see the progress of the compilation as shown below:


Thus, if you return to your project directory, you should see a new folder obj which has just been added. Obj folder contains the executable of your application.

To launch the application, move to obj folder.

Under Shell, type:

Then type:

SweetTutos, remember, is the name we just choose for the executable, you can view it in the GNUmakefile file.


And here it is, Hello World is displayed on the console :]

You are on the right track. Now, you can safely code in Objective-C 😉

Don’t hesitate to leave a comment. I’d love to hear your thoughts!

About Malek

Malek is a passionate iOS Engineer and Founder of Medigarage Studios, a small mobile games startup. I started my iOS adventures in 2011 and since then I fell in love with it. You can hire me for your project, get in touch by Email to discuss further details. Also, feel free to reach out on Twitter and Google+.

  • Pingback: Objective-C on Windows? Yes, you can! « sweettutos « Sutoprise Avenue, A SutoCom Source()

  • llodia

    I am getting the error sh: SweetTutos: command not found

  • rmatt

    great tutorial. But right at the end you need to type ./SweetTutos
    (that is dot forwardslash before the executable filename)

    many thanks

  • you said “PS : Be sure to save the file with the extension (*. Mak)”

    this confused me and calling it GNUmakefile.mak does not work. It must not have an extension *.mak on the end of the file or make will not accept it.

  • “No target specified and no make file found” error! what should I do?

  • Awesome stuff but I get some error: *No targets specified and no make file found”

  • Fatchul Bari Hikmawan

    Hey guys, I found the solution for “No target specified and no make file found” error.
    Please just save those “make file” without extention, just name it “GNUmakefile” (without extension)

  • Rick

    this post already for a while.
    need to be fixed by follow:
    1.save your makefile with named ‘GNUMakefile’ without extension
    2.build with command ‘make -f GNUMakefile’

  • wait…. what?
    I’m getting the same error (sh: SweetTutos: command not found)
    where am I putting this “./SweetTutos”?

  • sarab

    thank u so much.. it would be really difficult to compile without your help.. thanks a ton…!!

  • Sunil kadiwal

    how do I open the shell on windows 8??

  • it says no such file or directory

  • Skyking

    I don’t understand… this article starts off explaining how to install Objective-C under Windows, and then later switches to Linux when showing how to compile and run the program.

    Can you please explain how to compile and run under Windows, assuming the standard installation into the default folders? I followed all the download and installation instructions just fine, and even created the test files GNUmakefile and main.m. But from then on, it jumps to Linux.


  • Skyking

    OHHHH, I am such a doofus!! I thought you were showing an example in Linux. I missed the step to open the newly installed Windows program called /GNUstep/Shell on the Windows Start menu! Yup, when you click THAT, the examples make much more sense. Thanks!

  • Jay

    Awesome Tutorial !!!
    Great Work Malek.

  • I have no idea, I couldn’t find the shell in this stupid windows 8 start menu

  • ganesh

    goto application page , and then enter ctrl+tab, which will list all the programs.

  • ganesh

    “Command not found”:
    I am getting this error while typing SweetTutos after obj creation
    can anyone help me.

  • ganesh

    Ya Thanks it worked for me,
    In the cmd prompt instead of SweetTutos, just type ./SweetTutos

  • ganesh

    On windows 8, goto startup page/ application page then enter ctrl+tab you can see all available programs in the list.Scroll to find GNUstep shell.

  • Thank you Jay, stay tuned for more tutorials. Feel free to tweet me a request if you need to implement some technique, etc, so I can write a tutorial about it for you 🙂

  • Thanks guys for the feedback. Actually it has been a while since I wrote this guide, I implemented the GNUStep environment and objective-c compiler in 2011 to learn some Obj-C basics and to see whether it was possible for Windows users to get that to work. I wrote this guide in 2012 so please take into consideration any system or libraries changes 🙂


  • Jay

    For sure Malek.
    I may need your help to publish an iPhone app.
    Please share your contact details.

    Thanks again 🙂

  • Sure, please send me a private message on twitter so we can share details later on. You can reach me on twitter from the right twitter widget.

  • D. S. Schneider

    Thank you very much for this useful information. I believe the next step would be giving us some hints on how to get a simple UI started. 🙂

  • Hi, Thanks for your comment, please email me at malek.isims88@gmail.com for any tutorial you want to see online to get you started in iOS, so I can put it on my to-do list and make it to help you 🙂

    For windows development with Objective-C, as far as I know, you cannot go further for a UI enhancements with GNUStep.

    Le me know.

  • D. S. Schneider

    I’m really interested in cross-platform (read Windows for now) UI programming. Nothing fancy, just creating a Window with the standard GNUStep UI components. As a plus, I’m particularly interested in a “canvas” element and drawing primitives… 🙂

  • D. S. Schneider

    It seems I just found what I was looking for:

    This tutorial has a section on GUI which does exactly what I wanted, a GUI app without using Gorm, just plain code from scratch.

    Thanks anyway, your tutorial was the spark which started it all for my Objective-C on Windows fun! 🙂

  • varun

    when i hit make it says command not found

  • Hi I made all these commands, now what will do? what is the next step? please respond.

  • Hi 🙂
    As a next step, you can install a visual editor to work with like D.S Shneider pointed out above (http://gnustep.made-it.com/GSPT/xml/Tutorial_en.html)

  • Pingback: Time to LEARN: Objective-C()

  • Pingback: Apple Swift compiler for Windows | DL-UAT()

  • Denis Mahony

    I get a error:

    DenisDesktop1 /c/MyProject
    $ make
    GNUmakefile:5: /common.make: No such file or directory
    GNUmakefile:15: /tool.make: No such file or directory
    make: *** No rule to make target ‘tool.make’ . Stop

    Install in Win7 as described here:

    Can you give me some pointers ?


  • Denis Mahony

    I reinstalled GNUstep again.
    I suspect I had installed in the wrong order first time.
    Now working 🙂


  • shashwat khanna

    I’m glad I found this. I tried many ways but couldn’t compile it. Thanks Sweettos!

  • tmalek

    I am glad to help 🙂

  • Howz it goin ladz?

    I have completed all steps correctly. However, in the last step where i need to type “SweetTutos” it is not working and replying “command not found”. Please Help

  • Suppandi Simbleton

    Try this command
    The ./ explicitly points to the directory in which the exe is available.

  • Extra GameTheory

    I’m trying to use the make command inside the right directory. I tried:
    make GNUmakefile.mak
    make main.m
    make GNUmakefile
    make main
    And neither option works. Any help?

  • Balachandar Jeldi

    Thank you Fatchul,

    I too faced the same problem. Your inputs helped me to compile it.

    Thanks alot.

  • Kama Kanna

    Super Except ./SweetTutos.exe

  • Pingback: Writing Objective-C code on Windows – Opposable Bits()

  • Pingback: The Past, Present and Future of Swift()


    Fight and die in the Syrian Army of course you leech rat

  • King GeneraL

    nice tutorial, work for windows 10