« Return to Thread: C++ header files

Re: C++ header files

by smontanaro :: Rate this Message:

Reply to Author | View in Thread


    Clint> I got the message below as a support request.  I am not a C++
    Clint> guy, and I have never actually read the standard, so I'd like to
    Clint> get some feedback from people who use it regularly.  This user is
    Clint> requesting that I add:

    Clint> #ifdef __cplusplus
    Clint> extern "C"
    Clint> {
    Clint> #endif
    Clint> ....

    Clint> #ifdef __cplusplus
    Clint> }
    Clint> #endif

That is the standard idiom.  It will instruct the C++ compiler to not mangle
the names between the braces (C linkage).  C compilers will not see it.

--
Skip Montanaro - skip@... - http://www.webfast.com/~skip/
"Be different, express yourself like everyone else."

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Math-atlas-devel mailing list
Math-atlas-devel@...
https://lists.sourceforge.net/lists/listinfo/math-atlas-devel

 « Return to Thread: C++ header files