Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You <em>can</em> use Objective C inside the Windows environment. If you follow these steps, it should be working just fine:</p> <ol> <li>Visit the <a href="http://www.gnustep.org/windows/index.html" rel="noreferrer">GNUstep website</a> and download <code>GNUstep MSYS Subsystem</code> (MSYS for GNUstep), <code>GNUstep Core</code> (Libraries for GNUstep), and <code>GNUstep Devel</code></li> <li>After downloading these files, install in that order, or you will have problems with configuration</li> <li>Navigate to <code>C:\GNUstep\GNUstep\System\Library\Headers\Foundation</code><sup>1</sup> and ensure that <code>Foundation.h</code> exists</li> <li>Open up a command prompt and run <code>gcc -v</code> to check that <code>GNUstep MSYS</code> is correctly installed (if you get a file not found error, ensure that the <code>bin</code> folder of <code>GNUstep MSYS</code> is in your <code>PATH</code>)</li> <li><p>Use this simple "Hello World" program to test GNUstep's functionality:</p> <pre><code>#include &lt;Foundation/Foundation.h&gt; int main(void) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSLog(@"Hello World!."); [pool drain]; return; } </code></pre></li> <li><p>Go back to the command prompt and <code>cd</code> to where you saved the "Hello World" program and then compile it:<sup>2</sup></p> <pre><code>gcc -o helloworld.exe &lt;HELLOWORLD&gt;.m -I /GNUstep/GNUstep/System/Library/Headers -L /GNUstep/GNUstep/System/Library/Libraries -std=c99 -lobjc -lgnustep-base -fconstant-string-class=NSConstantString </code></pre></li> <li><p>Finally, from the command prompt, type <code>helloworld</code> to run it</p></li> </ol> <p>All the best, and have fun with Objective-C!</p> <hr> <p><strong>NOTES</strong>:</p> <ol> <li>I used the default install path - adjust your command line accordingly</li> <li>Ensure the folder path of yours is similar to mine, otherwise you will get an error</li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload