 (void *) &thread_args[i]);
	}

	/* wait for threads to finish */
	for (i=0; i&lt;NTHREADS; ++i) {
		rc = pthread_join(threads[i], NULL);
	}

	return 1;
}
</pre>

<h3>SDL</h3>

<pre>cc demo.c -I/usr/local/include -L/usr/local/lib -lSDL2 -o demo</pre>

<p>To compile the following example, place a <code>graphic.bmp</code> file in the same location as the c file, or remove the image block.</p>

<pre>
#include &lt;SDL2/SDL.h&gt;
#include &lt;stdio.h&gt;

int
error(char* msg, const char* err)
{
	printf("Error %s