[petsc-users] calling PETSc from C++
Satish Balay
balay at mcs.anl.gov
Mon Mar 12 16:55:06 CDT 2012
On Mon, 12 Mar 2012, Matthew Knepley wrote:
>
> The makefiles are simple. Here is building an executable:
you need some addtional stuf..
include ${PETSC_DIR}/conf/variables
include ${PETSC_DIR}/conf/rules
> myProg: myProg.o otherSource.o anotherSource.o
> ${CLINKER} -o myProg ${PETSC_TS_LIB}
attaching a sample makefile. Also its best to build petsc with option
--with-clanguage=cxx [if using from c++].
Satish
-------------- next part --------------
CFLAGS =
FFLAGS =
CPPFLAGS =
FPPFLAGS =
CLEANFILES =
include ${PETSC_DIR}/conf/variables
include ${PETSC_DIR}/conf/rules
ex1: ex1.o chkopts
-${CLINKER} -o ex1 ex1.o ${PETSC_LIB}
${RM} ex1.o
More information about the petsc-users
mailing list