Unable to build ex2 with Visual Studio due to linking errors
Matthew Knepley
knepley at gmail.com
Sat Sep 20 13:25:05 CDT 2008
On Thu, Sep 18, 2008 at 12:38 PM, Thuc Bui <bui at calcreek.com> wrote:
> Dear all,
>
> Unfortunately, I was unable to build the ex2 example in the tutorials
> directory even from the console with three unresolved external linking
> errors as shown below. What other libraries do I need to include in the
> Makefile to get ex2 built? I am using the Makefile given in the Tutorials
> directory without any modification.
This is the same error which you mailed in before. A file has not been compiled
on your system. You need to build in that directory
cd src/mat/impls/aij/mpi/csrperm
make
Matt
> Many thanks in advance for your help,
>
> Thuc
>
>
>
>
>
> ~/Petsc/latest/src/ksp/ksp/examples/tutorials
>
> $ make ex2
>
> /home/bbwannabe/Petsc/latest/bin/win32fe/win32fe cl -o ex2.o -c -wd4996 -MT
> -I/home/bbwannabe/Petsc/latest/src/dm/mesh/sieve
> -I/home/bbwannabe/Petsc/latest
> -I/home/bbwannabe/Petsc/latest/bmake/cygwin-c-opt
> -I/home/bbwannabe/Petsc/latest/include -I/cygdrive/c/Program
> Files/MPICH2/include -D__SDIR__="src/ksp/ksp/examples/tutorials/" ex2.c
>
> ex2.c
>
> /home/bbwannabe/Petsc/latest/bin/win32fe/win32fe cl -wd4996 -MT -o ex2
> ex2.o -L/home/bbwannabe/Petsc/latest/lib/cygwin-c-opt
> -L/home/bbwannabe/Petsc/latest/lib/cygwin-c-opt -lpetscksp -lpetscdm
> -lpetscmat -lpetscvec -lpetsc /cygdrive/c/Program\
> Files/MPICH2/lib/fmpich2.lib /cygdrive/c/Program\ Files/MPICH2/lib/mpi.lib
> -L/home/bbwannabe/Petsc/latest/externalpackages/f2cblaslapack/cygwin-c-opt
> -L/home/bbwannabe/Petsc/latest/externalpackages/f2cblaslapack/cygwin-c-opt
> -lf2clapack
> -L/home/bbwannabe/Petsc/latest/externalpackages/f2cblaslapack/cygwin-c-opt
> -L/home/bbwannabe/Petsc/latest/externalpackages/f2cblaslapack/cygwin-c-opt
> -lf2cblas Gdi32.lib User32.lib Advapi32.lib Kernel32.lib Ws2_32.lib
>
> libpetscmat.lib(mpiaij.o) : error LNK2019: unresolved external symbol
> _MatConvert_MPIAIJ_MPICSRPERM referenced in function _MatCreate_MPIAIJ
>
> libpetscmat.lib(matregis.o) : error LNK2019: unresolved external symbol
> _MatCreate_MPICSRPERM referenced in function _MatRegisterAll
>
> libpetscmat.lib(matregis.o) : error LNK2019: unresolved external symbol
> _MatCreate_CSRPERM referenced in function _MatRegisterAll
>
> C:\cygwin\home\BBWANN~1\Petsc\latest\src\ksp\ksp\examples\TUTORI~1\ex2.exe :
> fatal error LNK1120: 3 unresolved externals
>
> /usr/bin/rm -f ex2.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
More information about the petsc-users
mailing list