[petsc-dev] meaning of PETSC_USE_EXTERN_CXX?

Jed Brown jedbrown at mcs.anl.gov
Tue Mar 5 18:50:46 CST 2013


On Tue, Mar 5, 2013 at 6:34 PM, Matthew Knepley <knepley at gmail.com> wrote:

> I was asking about the second block. I don't understand why we would ever
>> want the C header to be broken when include from C++.
>>
>
> Broken? My interpretation was that this define was turning on extern C for
> the interface.


The meaning of configureExternC changed from clanguage=C++ with-c-support
to clanguage=C here:

https://bitbucket.org/petsc/petsc-dev/commits/4b6962c351cf8206afe8cedb48495b4fffc8fa18


Anyway, "broken" would be when clanguage=C (so the library automatically
extern "C"), but the header is include in a C++ project and extern "C" is
not used. I started using PETSc back when this did not work automatically.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130305/c4327d8b/attachment.html>


More information about the petsc-dev mailing list