does PETSC use template?

Yixun Liu yxliu at fudan.edu.cn
Sat Oct 28 02:54:16 CDT 2006


Hi,

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"{
#endif

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


#ifdef __cplusplus
}
#endif

Best,

Yixun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20061028/2ec5f25f/attachment.htm>


More information about the petsc-users mailing list