title: Trying to compile simple dll written in C using gcc fails
body: <p>Trying to compile a simple DLL written in C using gcc. </p>
  
  <p>Tried following many tutorials, but can't get it to compile even when I strip the file down to the very basics.</p>
  
  <p>test_dll.c</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  __declspec(dllexport) int __stdcall hello() {
      printf ("Hello World!\n");
  }
  </code></pre>
  
  <p>Trying to compile this using the command</p>
  
  <pre><code>gcc -c test_dll.c
  </code></pre>
  
  <p>Failing, getting this output</p>
  
  <pre><code>test_dll.c: In function '__declspec':
  test_dll.c:3:37: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'hello'
   __declspec(dllexport) int __stdcall hello() {
                                       ^
  test_dll.c:5:1: error: expected '{' at end of input
   }
   ^
  </code></pre>
  
  <p>gcc version</p>
  
  <pre><code>gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
  </code></pre>