[petsc-dev] what does extern "C" mean on a variable?
Barry Smith
bsmith at mcs.anl.gov
Wed Sep 17 22:44:49 CDT 2014
Jed,
In C++ land we have
#if defined(__cplusplus)
#define PETSC_EXTERN extern "C" PETSC_VISIBILITY_PUBLIC
#define PETSC_EXTERN_TYPEDEF extern "C"
#define PETSC_INTERN extern "C” PETSC_VISIBILITY_INTERNAL
what does it mean to say
PETSC_EXTERN PetscClassId AO_CLASSID; ? There is no c++ mangling with variables (or is there) so what does the extern “C” buy us? or mean?
should we have a different PETSC_EXTERN_VARIABLE for variables?
Barry
More information about the petsc-dev
mailing list