what is the use of extern "c"

Tim Prince n8tm@aol.com
Mon Jan 21 15:20:00 GMT 2013


On 1/20/2013 10:47 PM, horseriver wrote:
>
>     what is the use of extern c within a declaration?
>
>
>
extern "C" basically shuts off C++ symbol mangling (and facilities which 
depend on it), so as to facilitate linking with C and with languages 
such as Fortran which support C interoperability.  The definition seems 
rather loose; we frequently see reference operators used even though 
their compatibility with C is doubtful.

-- 
Tim Prince



More information about the Gcc-help mailing list