Unable to build ex2 with Visual Studio due to linking errors

Thuc Bui bui at calcreek.com
Thu Sep 18 12:38:46 CDT 2008


Dear all,

 

Hope you can help me out since I am quite lost. I successfully built
petsc-2.3.3-p13 with Visual Studio 03 using C++ with the following
configurations, which relist from the configure.log.

 

Configure Options: --with-cc="win32fe cl" --with-fc=0 --with-cxx="win32fe
cl" --download-c-blas-lapack --with-debugging=0 --useThreads=0
--with-shared=0 --configModules=PETSc.Configure
--optionsModule=PETSc.compilerOptions

Working directory: /home/bbwannabe/Petsc/latest

Python version:

2.5.1 (r251:54863, May 18 2007, 16:56:43) 

 

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.

 

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

 

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


More information about the petsc-users mailing list