include file fortran

Tahar Amari amari at cpht.polytechnique.fr
Fri May 15 17:05:44 CDT 2009


I am compiling a fortran code in principle not even one line of C++  
and link with libraries.

Do you mean that the line

> Undefined symbols:
>  "std::basic_ostringstream<char, std::char_traits<char>,  
> std::allocator<char> >::basic_ostringstream(std::_Ios_Openmode)",  
> referenced from:
>      PetscErrorCxx(int, char const*, char const*, char const*, int,  
> int)in libpetsc.a(err.o)



is not telling that the c++ missing symbol is not in   
libpetsc.a(err.o) ?

which is from what I understand petsc library and not my source ?


Tahar





Le 16 mai 09 à 00:00, Matthew Knepley a écrit :

> On Fri, May 15, 2009 at 4:56 PM, Tahar Amari <amari at cpht.polytechnique.fr 
> > wrote:
> I am sorry (I might have missed something)
>
>
>
> If you want to use C++, you should configure using --with- 
> clanguage=cxx. Then you will get the C++ linker.
>
> I do not really want to use C++ linker
>
> I did it with the C Linker and got an error. I do not see where the C 
> ++ is now used
>
> You have C++ code in there somewhere. It is hard to see what is  
> going on since we do not have the source.
>
>   Matt
>
>
> Tahar
>
>
> cc  -o  mh4d mh4d.o petsc.o comm.o setbc.o local.o gridutil.o  
> mympi.o terminator.o operator.o shellsort.o edge.o side.o vertex.o  
> tetrahedron.o rotation.o tetrahedralgrid.o field.o   -I/usr/local/ 
> hdf/HDF4.2r1/include -L/usr/local/hdf/HDF4.2r1/lib -lmfhdf -ldf -lsz  
> -ljpeg -lz -L/usr/local/petsc/macx/lib -lpetscsnes -lpetscvec - 
> lpetscmat -lpetsccontrib -lpetscts -lpetscdm -lpetscksp -lpetsc - 
> lmpich -lmpichcxx -lpmpich -lfmpich -lmpichf90 -lparmetis -lmetis - 
> lfblas -lflapack  -L/usr/X11R6/lib -lX11 -lXt -lXext -lX11  -L/usr/ 
> local/petsc/macx/lib -lpetscsnes -lpetscvec -lpetscmat - 
> lpetsccontrib -lpetscts -lpetscdm -lpetscksp -lpetsc -lmpich - 
> lmpichcxx -lpmpich -lfmpich -lmpichf90 -lparmetis -lmetis -lfblas - 
> lflapack
> Undefined symbols:
>  "std::basic_ostringstream<char, std::char_traits<char>,  
> std::allocator<char> >::basic_ostringstream(std::_Ios_Openmode)",  
> referenced from:
>      PetscErrorCxx(int, char const*, char const*, char const*, int,  
> int)in libpetsc.a(err.o)
>      PETSc::Exception::Exception(std::basic_string<char,  
> std::char_traits<char>, std::allocator<char> > const&)in  
> libpetsc.a(err.o)
>  "_for_stop_core", referenced from:
>      _advmom_cv_ in mh4d.o
>      _advmom_cv_ in mh4d.o
>      _advmom_cv_ in mh4d.o
>      _terminators_mp_terminator_ in terminator.o
>      _terminators_mp_terminator_all_ in terminator.o
>      _tetrahedralgrid_mod_mp_zero_bndr_tvv_ in tetrahedralgrid.o
>      _tetrahedralgrid_mod_mp_zero_bndr_tvv_ in tetrahedralgrid.o
>      _tetrahedralgrid_mod_mp_idnt_bndr_tvv_ in tetrahedralgrid.o
>      _tetrahedralgrid_mod_mp_idnt_bndr_tvv_ in tetrahedralgrid.o
>      _tetrahedralgrid_mod_mp_v2v_operator_bc_ in tetrahedralgrid.o
>      _tetrahedralgrid_mod_mp_v2v_operator_bc_ in tetrahedralgrid.o
>      _tetrahedralgrid_mod_mp_tvvaxpy_ in tetrahedralgrid.o
>      _tetrahedralgrid_mod_mp_tvvaxpy_ in tetrahedralgrid.o
>      _tetrahedralgrid_mod_mp_v2v_scalar_bc_ in tetrahedralgrid.o
>      _tetrahedralgrid_mod_mp_v2v_scalar_bc_ in tetrahedralgrid.o
>      _tetrahedralgrid_mod_mp_zero_bndr_tvs_ in tetrahedralgrid.o
>      _tetrahedralgrid_mod_mp_zero_bndr_tvs_ in tetrahedralgrid.o
>      _tetrahedralgrid_mod_mp_v2v_operator_bc0_ in tetrahedralgrid.o
>      _tetrahedralgrid_mod_mp_v2v_operator_bc0_ in tetrahedralgrid.o
>      _tetrahedralgrid_mod_mp_v2v_operator_bct_ in tetrahedralgrid.o
>      _tetrahedralgrid_mod_mp_v2v_operator_bct_ in tetrahedralgrid.o
>      _xerbla_ in libfblas.a(xerbla.o)
>  "_for_exit", referenced from:
>      _tetrahedralgrid_mod_mp_partition_tetragrid_ in tetrahedralgrid.o
>
>
>
>
> -- 
> What most experimenters take for granted before they begin their  
> experiments is infinitely more interesting than any results to which  
> their experiments lead.
> -- Norbert Wiener

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090516/7a0c83d0/attachment.htm>


More information about the petsc-users mailing list