Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Depends on which platform, but on Linux, Mac OS X and similar (including Cygwin), <a href="http://gcc.gnu.org/" rel="nofollow noreferrer">gcc</a> is most common.</p> <p>Say I have a script named <code>myapp.c</code>:</p> <pre><code>#import &lt;stdio.h&gt; int main(){ printf("Hi!\n"); return 0; } </code></pre> <p>To compile it from the command line using gcc is very simple, just run:</p> <pre><code>gcc myapp.c </code></pre> <p>..that outputs the binary as "a.out" (the default filename). To run the compiled app, just do..</p> <pre><code>./a.out #which outputs: Hi! </code></pre> <p>Or put it somewhere within your $PATH (for example, <code>/usr/bin</code> or <code>~/bin/</code>) and run <code>a.out</code></p> <p>You can specify the output filename with the <code>-o</code> flag:</p> <pre><code>gcc myapp.c -o myapp ./myapp # output: Hi! </code></pre> <p>As for more complete guides, <a href="http://cocoadevcentral.com/articles/000081.php" rel="nofollow noreferrer">"Learn C for Cocoa"</a> is a good, quick guide on the C language, and covers compiling. If you're interested in learning ObjC, the <a href="http://cocoadevcentral.com/d/learn_objectivec/" rel="nofollow noreferrer">next part of the guide</a> is also great.</p> <p>On Windows, I would recommend looking into Visual Studio, specifically the <a href="http://www.microsoft.com/Express/" rel="nofollow noreferrer">Express editions</a> (which are free).</p> <p>There's no "Visual C", but the Visual C++ edition will compile C code (since C++ is an extension of C). There's also an option to "Compile as C code" somewhere in the build options.</p> <p>Finally, <a href="http://rads.stackoverflow.com/amzn/click/0131103628" rel="nofollow noreferrer">The C Programming Language</a> book covers, well, everything.</p>
    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.
    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