Hello for compiled problem

Satish Balay balay at mcs.anl.gov
Tue Mar 10 18:42:04 CDT 2009


On Wed, 11 Mar 2009, Wei-Dong Lian wrote:

> Hi,
> 
> [--with-shared=0, and do not use --with-dyanmic]
> I compiled petsc and link the static lib with my makefile
> "ADDLIBSTATIC := $(ADDLIBSTATIC) $(PETSC_LIBDIR)/ libpetsccontrib.a
> $(PETSC_LIBDIR)/libpetscksp.a $(PETSC_LIBDIR)/libpetscsnes.a
> $(PETSC_LIBDIR)/libpetscvec.a $(PETSC_LIBDIR)/libpetsc.a
> $(PETSC_LIBDIR)/libpetscdm.a $(PETSC_LIBDIR)/libpetscmat.a
> $(PETSC_LIBDIR)/libpetscts.a"
> The result was the same as before.

Because the order is same as before. Use the library order mentioned
in my previous e-mail.


> > -lpetsccontrib -lpetscts -lpetscsnes -lpetscksp -lpetscdm
> > -lpetscmat -lpetscvec -lpetsc

This might get it compiled - but it won't run. As mentioned before
you'll have to rebuild PETSc without '--with-dyanmic'

Satish

 So I really wonder how to link petsc with
> static library? This is useful when I could not generate shared library.
> Tomorrow morning I will try the  *setCompilers.py *that you sent me for
> avoiding the error of -PIC. it is 00:37, I will go to sleep.
> See you tomorrow. Good night.
> yours sincerely
> Weidong
> 


More information about the petsc-users mailing list