Compiling a C program without Main
<p>I have a simple C program I have to make (Which can't use a main function).</p>

<p>As such:</p>

<p>test.c</p>

<pre><code>#include &lt;stdio.h&gt;

int getUserID(int id);

int getUserID(int id) {
    return 0;
}
</code></pre>

<p>Where my current function does nothing as of now:
However, I'm trying to compile this through a makefile, as such:</p>

<pre><code>all:
    gcc test.c 
</code></pre>

<p>Which didn't work because I didn't have a main so then I added the -c command within it.</p>

<pre><code>all:
    gcc -c test.c
</code></pre>

<p>Which now compiles with make, but gives me an object file (but without a working executable), the executable I get when I try to run it: <code>i.e ./test tells me permission denied</code></p>

<p>Any help would be greatly appreciated.</p>