Jed,
Please don't make any other changes along this line for right now. I have
to merge my changes (removal/improvement of EXTERN_C_BEGIN/END) everywhere and
test on many combinations of c/c++, dynamic, split libraries and push before
you can make more changes. It is a little hairy.
On Mar 5, 2013, at 11:09 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
>
> PETSC_INTERN_C is for functions with internal visibility that must use the
> `extern "C"` calling convention. Normally this is any symbol passed to a
> dynamic registration function.
At times I've wanted to split the PETSc library into two (or more) parts.
The "interface" library, that contains functions users call directly like
KSPSetType(), KSPGMRESSetRestart() and the actual implementations, like
KPSCreate_GMRES(), KSPGMRESSetRestart_GMRES(), these would be loaded
dynamically. Hence I've kept the dynamic registration functions as
PETSC_EXTERN_C, not PETSC_INTERN_C. This "may" be a way to handle different
precisions, complexity in the same application also if we can figure out how to
put each implementation (for different precision, complexity) in a separate
dynamically loaded library and load several at a time (without symbol conflict).
Barry