From: Denis D. <dan...@ya...> - 2004-03-18 10:41:14
|
Hi, The theme of compilation and linking is the most popular in the last month... I try to set up libmesh 0.4.2 on the following configuration: cygwin + gcc3.3 + petsc(mpiuni) ./configure --enable-reference-counting --enable-perflog --disable-laspack --disable-tecplot --disable-shared I can build library, but when i try to compile and run an example program, an error appears in the form (output of make all -n for example 1) echo "Linking "ex1"..." g++ -O2 -felide-constructors -DNDEBUG -funroll-loops -fstrict-aliasing ex1.i686-pc-cygwin.o -o ex1 /home/denis/sci/libmesh-0.4.2/lib/i686-pc-cygwin_opt/libmesh.a /home/denis/sci/libmesh-0.4.2/contrib/lib/i686-pc-cygwin_opt/libparmetis.a /home/denis/sci/libmesh-0.4.2/contrib/lib/i686-pc-cygwin_opt/libmetis.a /home/denis/sci/libmesh-0.4.2/contrib/lib/i686-pc-cygwin_opt/libsfcurves.a /home/denis/sci/libmesh-0.4.2/contrib/lib/i686-pc-cygwin_opt/libgzstream.a -lz -L/home/denis/sci/petsc-2.1.6/lib/libO/win32_gnu -lpetscsles -lpetscdm -lpetscmat -lpetscvec -lpetsc -L /home/denis/sci/fblaslapack -lflapack -lfblas /home/denis/sci/petsc-2.1.6/lib/libO/win32_gnu/libmpiuni.a -L/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1 -L/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../.. -lfrtbegin -lg2c -lcygwin -luser32 -lkernel32 -ladvapi32 -lshell32 /home/denis/sci/petsc-2.1.6/lib/libO/win32_gnu/libmpiuni.a (and the corresponding error) make all Linking ex1... /home/denis/sci/libmesh-0.4.2/lib/i686-pc-cygwin_opt/libmesh.a(libmesh.i686-pc-cygwin.o)(.text+0x16f8):libmesh.C: undefined reference to `Petsc_MPI_Finalize()' /home/denis/sci/libmesh-0.4.2/lib/i686-pc-cygwin_opt/libmesh.a(equation_systems.i686-pc-cygwin.o)(.text+0x48ee):equation_systems.C: undefined reference to `MPIUNI_Memcpy(void*, void*, int)' /home/denis/sci/libmesh-0.4.2/lib/i686-pc-cygwin_opt/libmesh.a(equation_systems.i686-pc-cygwin.o)(.text+0x4e29):equation_systems.C: undefined reference to `MPIUNI_Memcpy(void*, void*, int)' /home/denis/sci/libmesh-0.4.2/lib/i686-pc-cygwin_opt/libmesh.a(parmetis_partitioner.i686-pc-cygwin.o)(.text+0x3f1):parmetis_partitioner.C: undefined reference to `MPIUNI_Memcpy(void*, void*, int)' /home/denis/sci/libmesh-0.4.2/lib/i686-pc-cygwin_opt/libmesh.a(petsc_vector.i686-pc-cygwin.o)(.text+0x27a):petsc_vector.C: undefined reference to `MPIUNI_Memcpy(void*, void*, int)' /home/denis/sci/libmesh-0.4.2/lib/i686-pc-cygwin_opt/libmesh.a(petsc_vector.i686-pc-cygwin.o)(.text+0x6c9):petsc_vector.C: undefined reference to `MPIUNI_Memcpy(void*, void*, int)' collect2: ld returned 1 exit status make: *** [ex1] Error 1 It seems all the necessary libs are included in command line (particular libmpiuni.a ans petsc), however Petsc_MPI_Finalize() and MPIUNI_Memcpy() are not found. Any suggestion how get it working in this configuration (without laspack)? Best regards Denis |