Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Error in linking .lib

chdthanh
Beginner
668 Views
Dear all,
I got errors as linking to mkl libraries. Can you please give me how to solve it? Thank you in advance

1>------ Build started: Project: simple, Configuration: Debug Win32 ------

1>Linking...

1>mumps_common_c_mp.lib(mumps_io.obj) : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification

1>MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: _sprintf already defined in LIBCMTD.lib(sprintf.obj)

1>MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: _printf already defined in LIBCMTD.lib(printf.obj)

1>MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: _strncpy already defined in LIBCMTD.lib(strncpy.obj)

1>MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: _free already defined in LIBCMTD.lib(dbgheap.obj)

1>MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: _strerror already defined in LIBCMTD.lib(strerror.obj)

1>MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: __errno already defined in LIBCMTD.lib(dosmap.obj)

1>MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: _exit already defined in LIBCMTD.lib(crt0dat.obj)

1>MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: _malloc already defined in LIBCMTD.lib(dbgheap.obj)

1>MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: _fopen already defined in LIBCMTD.lib(fopen.obj)

1>MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: _realloc already defined in LIBCMTD.lib(dbgheap.obj)

1>MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: _fclose already defined in LIBCMTD.lib(fclose.obj)

1>MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: _getenv already defined in LIBCMTD.lib(getenv.obj)

1>MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: _fwrite already defined in LIBCMTD.lib(fwrite.obj)

1>MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: _clock already defined in LIBCMTD.lib(clock.obj)

1>MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: _fprintf already defined in LIBCMTD.lib(fprintf.obj)

1>MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: ___iob_func already defined in LIBCMTD.lib(_file.obj)

1>MSVCRTD.lib(MSVCR80D.dll) : error LNK2005: _rand already defined in LIBCMTD.lib(rand.obj)

1>MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)

1>MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)

1>LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library

1>mkl_blacs_mpich2.lib(blacs_gridexit_.obj) : error LNK2019: unresolved external symbol _MPI_Comm_free referenced in function _BLACS_GRIDEXIT

1>mkl_blacs_mpich2.lib(blacs_gridmap_.obj) : error LNK2019: unresolved external symbol _MPI_Type_contiguous referenced in function _BLACS_GRIDMAP

1>mkl_blacs_mpich2.lib(blacs_gridmap_.obj) : error LNK2019: unresolved external symbol _MPI_Type_commit referenced in function _BLACS_GRIDMAP

1>mkl_blacs_mpich2.lib(igamn2d_.obj) : error LNK2001: unresolved external symbol _MPI_Type_commit

1>mkl_blacs_mpich2.lib(dgamx2d_.oo) : error LNK2001: unresolved external symbol _MPI_Type_commit

1>mkl_blacs_mpich2.lib(BI_GetMpiGeType.obj) : error LNK2001: unresolved external symbol _MPI_Type_commit

1>mkl_blacs_mpich2.lib(blacs_gridmap_.obj) : error LNK2019: unresolved external symbol _MPI_Comm_dup referenced in function _BLACS_GRIDMAP

1>mkl_blacs_mpich2.lib(blacs_gridmap_.obj) : error LNK2019: unresolved external symbol _MPI_Comm_rank referenced in function _BLACS_GRIDMAP

1>mkl_blacs_mpich2.lib(blacs_pinfo_.oo) : error LNK2001: unresolved external symbol _MPI_Comm_rank

1>mkl_blacs_mpich2.lib(blacs_gridmap_.obj) : error LNK2019: unresolved external symbol _MPI_Comm_split referenced in function _BLACS_GRIDMAP

1>mkl_blacs_mpich2.lib(BI_BlacsAbort.obj) : error LNK2019: unresolved external symbol _MPI_Abort referenced in function _BI_BlacsAbort

1>mkl_blacs_mpich2.lib(blacs_pinfo_.oo) : error LNK2019: unresolved external symbol _MPI_Initialized referenced in function _Cblacs_pinfo

1>mkl_blacs_mpich2.lib(blacs_pinfo_.oo) : error LNK2019: unresolved external symbol _MPI_Comm_size referenced in function _Cblacs_pinfo

1>mkl_blacs_mpich2.lib(blacs_pinfo_.oo) : error LNK2019: unresolved external symbol _MPI_Init referenced in function _Cblacs_pinfo

1>mkl_blacs_mpich2.lib(BI_TransUserComm.obj) : error LNK2019: unresolved external symbol _MPI_Comm_group referenced in function _BI_TransUserComm

1>mkl_blacs_mpich2.lib(BI_TransUserComm.obj) : error LNK2019: unresolved external symbol _MPI_Group_incl referenced in function _BI_TransUserComm

1>mkl_blacs_mpich2.lib(BI_TransUserComm.obj) : error LNK2019: unresolved external symbol _MPI_Comm_create referenced in function _BI_TransUserComm

1>mkl_blacs_mpich2.lib(BI_TransUserComm.obj) : error LNK2019: unresolved external symbol _MPI_Group_free referenced in function _BI_TransUserComm

1>mkl_blacs_mpich2.lib(blacs_get_.oo) : error LNK2019: unresolved external symbol _MPI_Attr_get referenced in function _Cblacs_get

1>mkl_blacs_mpich2.lib(igamn2d_.obj) : error LNK2019: unresolved external symbol _MPI_Type_struct referenced in function _IGAMN2D

1>mkl_blacs_mpich2.lib(dgamx2d_.oo) : error LNK2001: unresolved external symbol _MPI_Type_struct

1>mkl_blacs_mpich2.lib(dgebs2d_.oo) : error LNK2019: unresolved external symbol _MPI_Type_free referenced in function _Cdgebs2d

1>mkl_blacs_mpich2.lib(dgebr2d_.oo) : error LNK2001: unresolved external symbol _MPI_Type_free

1>mkl_blacs_mpich2.lib(igesd2d_.obj) : error LNK2001: unresolved external symbol _MPI_Type_free

1>mkl_blacs_mpich2.lib(igerv2d_.obj) : error LNK2001: unresolved external symbol _MPI_Type_free

1>mkl_blacs_mpich2.lib(igebs2d_.oo) : error LNK2001: unresolved external symbol _MPI_Type_free

1>mkl_blacs_mpich2.lib(igebr2d_.oo) : error LNK2001: unresolved external symbol _MPI_Type_free

1>mkl_blacs_mpich2.lib(dgerv2d_.oo) : error LNK2001: unresolved external symbol _MPI_Type_free

1>mkl_blacs_mpich2.lib(dgesd2d_.oo) : error LNK2001: unresolved external symbol _MPI_Type_free

1>mkl_blacs_mpich2.lib(igamn2d_.obj) : error LNK2001: unresolved external symbol _MPI_Type_free

1>mkl_blacs_mpich2.lib(igebs2d_.obj) : error LNK2001: unresolved external symbol _MPI_Type_free

1>mkl_blacs_mpich2.lib(igebr2d_.obj) : error LNK2001: unresolved external symbol _MPI_Type_free

1>mkl_blacs_mpich2.lib(dgamx2d_.oo) : error LNK2001: unresolved external symbol _MPI_Type_free

1>mkl_blacs_mpich2.lib(igamn2d_.obj) : error LNK2019: unresolved external symbol _MPI_Op_create referenced in function _IGAMN2D

1>mkl_blacs_mpich2.lib(dgamx2d_.oo) : error LNK2001: unresolved external symbol _MPI_Op_create

1>mkl_blacs_mpich2.lib(igamn2d_.obj) : error LNK2019: unresolved external symbol _MPI_Reduce referenced in function _IGAMN2D

1>mkl_blacs_mpich2.lib(dgamx2d_.oo) : error LNK2001: unresolved external symbol _MPI_Reduce

1>mkl_blacs_mpich2.lib(dgsum2d_.oo) : error LNK2001: unresolved external symbol _MPI_Reduce

1>mkl_blacs_mpich2.lib(igamn2d_.obj) : error LNK2019: unresolved external symbol _MPI_Op_free referenced in function _IGAMN2D

1>mkl_blacs_mpich2.lib(dgamx2d_.oo) : error LNK2001: unresolved external symbol _MPI_Op_free

1>mkl_blacs_mpich2.lib(igamn2d_.obj) : error LNK2019: unresolved external symbol _MPI_Allreduce referenced in function _IGAMN2D

1>mkl_blacs_mpich2.lib(dgamx2d_.oo) : error LNK2001: unresolved external symbol _MPI_Allreduce

1>mkl_blacs_mpich2.lib(dgsum2d_.oo) : error LNK2001: unresolved external symbol _MPI_Allreduce

1>mkl_blacs_mpich2.lib(dgebs2d_.oo) : error LNK2019: unresolved external symbol _MPI_Bcast referenced in function _Cdgebs2d

1>mkl_blacs_mpich2.lib(dgebr2d_.oo) : error LNK2001: unresolved external symbol _MPI_Bcast

1>mkl_blacs_mpich2.lib(igebs2d_.obj) : error LNK2001: unresolved external symbol _MPI_Bcast

1>mkl_blacs_mpich2.lib(igebr2d_.obj) : error LNK2001: unresolved external symbol _MPI_Bcast

1>mkl_blacs_mpich2.lib(igebs2d_.oo) : error LNK2001: unresolved external symbol _MPI_Bcast

1>mkl_blacs_mpich2.lib(igebr2d_.oo) : error LNK2001: unresolved external symbol _MPI_Bcast

1>mkl_blacs_mpich2.lib(BI_BeComb.obj) : error LNK2019: unresolved external symbol _MPI_Sendrecv referenced in function _BI_BeComb

1>mkl_blacs_mpich2.lib(BI_GetMpiGeType.obj) : error LNK2019: unresolved external symbol _MPI_Type_vector referenced in function _BI_GetMpiGeType

1>mkl_blacs_mpich2.lib(BI_Ssend.obj) : error LNK2019: unresolved external symbol _MPI_Send referenced in function _BI_Ssend

1>mkl_blacs_mpich2.lib(BI_Srecv.obj) : error LNK2019: unresolved external symbol _MPI_Recv referenced in function _BI_Srecv

1>mkl_blacs_mpich2.lib(BI_Pack.obj) : error LNK2019: unresolved external symbol _MPI_Pack referenced in function _BI_Pack

1>mkl_blacs_mpich2.lib(BI_Pack.obj) : error LNK2019: unresolved external symbol _MPI_Pack_size referenced in function _BI_Pack

1>mkl_blacs_mpich2.lib(BI_Asend.obj) : error LNK2019: unresolved external symbol _MPI_Isend referenced in function _BI_Asend

1>mkl_blacs_mpich2.lib(BI_Asend.obj) : error LNK2019: unresolved external symbol _MPI_Error_class referenced in function _BI_Asend

1>mkl_blacs_mpich2.lib(BI_Arecv.obj) : error LNK2001: unresolved external symbol _MPI_Error_class

1>mkl_blacs_mpich2.lib(BI_BuffIsFree.obj) : error LNK2019: unresolved external symbol _MPI_Testall referenced in function _BI_BuffIsFree

1>mkl_blacs_mpich2.lib(BI_BuffIsFree.obj) : error LNK2019: unresolved external symbol _MPI_Waitall referenced in function _BI_BuffIsFree

1>mkl_blacs_mpich2.lib(BI_Arecv.obj) : error LNK2019: unresolved external symbol _MPI_Irecv referenced in function _BI_Arecv

1>mkl_blacs_mpich2.lib(BI_Rsend.obj) : error LNK2019: unresolved external symbol _MPI_Rsend referenced in function _BI_Rsend

1>mkl_blacs_mpich2.lib(dwalltime00_.obj) : error LNK2019: unresolved external symbol _MPI_Wtime referenced in function _DWALLTIME00

1>Debug\\simple.exe : fatal error LNK1120: 35 unresolved externals

1>

1>Build log written to "file://E:\\2010\\MUMPS_study\\simple\\Debug\\BuildLog.htm"

1>simple - 83 error(s), 2 warning(s)

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


I am using these library:
fmpich2.lib dmumps_fortran_mp.lib dmumps_c_mp.lib mumps_common_c_mp.lib pord_c_mp.lib mkl_c.lib mkl_intel_thread.lib mkl_core.lib mkl_cdft.lib mkl_cdft_core.lib mkl_scalapack.lib libguide.lib mkl_blacs_mpich2.lib mkl_blas95.lib

Thanh
0 Kudos
2 Replies
TimP
Honored Contributor III
668 Views

It looks like you would need a mumps expert. Have you tried simplifying the problem to narrow it down? You could link mkl_sequential so as to remove a layer of dependencies.
You may have attempted to link a mixture of debug and non-debug, may not have used your MPI wrapper command (e.g. mpif90), and should consider using libiomp5 rather than libguide, in case there is a reference to vcomp functions.
0 Kudos
mamey4
Beginner
668 Views
So was that problem ever resolved? I'm getting exactly the same errors.
The first ones can be solved by adding /FORCE:MULTIPLE to the linker command line arguments, but I'm not sure about the last ones.
0 Kudos
Reply