does PETSC use template?

Yixun Liu yxliu at
Sat Oct 28 02:54:16 CDT 2006


Does PETSC use template? I think it does not use it because it implements with c. But, why vc++ compiler generate the error "error C2894: templates cannot be declared to have 'C' linkage" when I write the code as,

#ifdef __cplusplus
extern "C"{

#include <petsc.h>
#include <petscmat.h>
#include <petscvec.h>
#include <petscksp.h>

#ifdef __cplusplus


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the petsc-users mailing list