How to compile C code containing extern "C" directive?
<p>In Visual Studio 2008, there's a nice debug heap coded in file <code>dbgheap.c</code>.  It implements functions such as <code>_CrtDumpMemoryLeaks()</code>.</p>

<p>I note the file includes <code>extern "C"</code> directives that don't seem to be allowed by Microsoft's own compiler.  Code like:</p>

<pre><code>extern "C" _CRTIMP int __cdecl _CrtDumpMemoryLeaks(
    void
    )
{
    /* only dump leaks when there are in fact leaks */
</code></pre>

<p>Simply produces errors if you try to compile it yourself.  Obviously there are compiler flags to allow this syntax, but anyone know what the flags are?</p>