Linking problems with ifort and visual studio 2003

Ben Tay zonexo at gmail.com
Sun Mar 23 07:16:18 CDT 2008


Hi,

I've successfully compiled the library of PETSc. The examples also 
worked (I tested ex1f). However in the IDE of visual studio 2003, I 
can't seem to link, although compiling the individual files were fine. 
The errors are:

global.obj  error LNK2019: unresolved external symbol 
_PETSCINITIALIZE at 12 referenced in function _GLOBAL_DATA_mp_ALLO_VAR
global.obj  error LNK2019: unresolved external symbol 
_MATCREATESEQAIJ at 28 referenced in function _GLOBAL_DATA_mp_ALLO_VAR
global.obj  error LNK2019: unresolved external symbol _VECCREATESEQ at 16 
referenced in function _GLOBAL_DATA_mp_ALLO_VAR
global.obj  error LNK2019: unresolved external symbol _VECDUPLICATE at 12 
referenced in function _GLOBAL_DATA_mp_ALLO_VAR
global.obj  error LNK2019: unresolved external symbol _KSPCREATE at 12 
referenced in function _GLOBAL_DATA_mp_ALLO_VAR
global.obj  error LNK2019: unresolved external symbol 
_VECASSEMBLYBEGIN at 8 referenced in function _GLOBAL_DATA_mp_ALLO_VAR
global.obj  error LNK2019: unresolved external symbol _VECASSEMBLYEND at 8 
referenced in function _GLOBAL_DATA_mp_ALLO_VAR
bc.obj  error LNK2019: unresolved external symbol _MATSETVALUES at 32 
referenced in function _BC_mp_BC_BIG_A_S
bc_impl.obj  error LNK2001: unresolved external symbol _MATSETVALUES at 32
set_matrix.obj  error LNK2001: unresolved external symbol _MATSETVALUES at 32
petsc_sub.obj  error LNK2001: unresolved external symbol _MATSETVALUES at 32
bc_impl.obj  error LNK2019: unresolved external symbol _VECSETVALUE at 20 
referenced in function _BC_IMPL_mp_BC_Q_IMPL_S
set_matrix.obj  error LNK2001: unresolved external symbol _VECSETVALUE at 20
petsc_sub.obj  error LNK2001: unresolved external symbol _VECSETVALUE at 20
petsc_sub.obj  error LNK2019: unresolved external symbol 
_MATASSEMBLYBEGIN at 12 referenced in function _PETSC_SUB_mp_PETSC_SOLVER_MOM
petsc_sub.obj  error LNK2019: unresolved external symbol 
_MATASSEMBLYEND at 12 referenced in function _PETSC_SUB_mp_PETSC_SOLVER_MOM
petsc_sub.obj  error LNK2019: unresolved external symbol _MATSCALE at 12 
referenced in function _PETSC_SUB_mp_PETSC_SOLVER_MOM
petsc_sub.obj  error LNK2019: unresolved external symbol 
_KSPSETOPERATORS at 20 referenced in function _PETSC_SUB_mp_PETSC_SOLVER_MOM
petsc_sub.obj  error LNK2019: unresolved external symbol _KSPGETPC at 12 
referenced in function _PETSC_SUB_mp_PETSC_SOLVER_MOM
petsc_sub.obj  error LNK2019: unresolved external symbol _KSPSETTYPE at 16 
referenced in function _PETSC_SUB_mp_PETSC_SOLVER_MOM
petsc_sub.obj  error LNK2019: unresolved external symbol _PCSETTYPE at 16 
referenced in function _PETSC_SUB_mp_PETSC_SOLVER_MOM


I was using Compaq visual fortran initially and I have converted the 
*.dsw file to the visual studio 2003 format. Of cos, I have changed the 
locations to the new PETSc directory. May I know what's happening? Is 
there anything I need to set or changed in studio 2003?

Thanks alot!




More information about the petsc-users mailing list