- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am building a project using:
Microsoft Visual Studio 2005
Version 8.0.50727.762 (SP.050727-7600)
Microsoft .NET Framework
Version 2.0.50727
Installed Edition: Professional
Microsoft Visual C# 2005 77626-009-1998976-41170
Microsoft Visual C# 2005
Microsoft Visual C++ 2005 77626-009-1998976-41170
Microsoft Visual C++ 2005
Microsoft Visual J# 2005 77626-009-1998976-41170
Microsoft Visual J# 2005
Microsoft Visual Web Developer 2005 77626-009-1998976-41170
Microsoft Visual Web Developer 2005
Microsoft Web Application Projects 2005 77626-009-1998976-41170
Microsoft Web Application Projects 2005
Version 8.0.50727.762
Crystal Reports AAC60-G0CSA4B-V7000AY
Crystal Reports for Visual Studio 2005
Intel Fortran Compiler Integration
Intel Fortran Compiler Integration for Microsoft Visual Studio 2005, Version 10.0.3718.2005, Copyright (C) 2002-2007 Intel Corporation
Microsoft Visual Studio 2005 Professional Edition - ENU Service Pack 1 (KB926601)
I have a f90 master that links to a C library. The C library calls the MKL CBlas routines.
Under Debug it all compiles and links fine. When I go to build a Release version I get all of the following errors:
Linking...
Link /OUT:"Releasemare2d_v2.1_intel.exe
" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:Program FilesIntelMKL9.1ia32lib" /MANIFEST /MANIFESTFILE:"C:mhoversmare2d_v2.1_intel eleasemare2d_v2.1_intel.exe.intermediate.manifest" /SUBSYSTEM:CONSOLE mkl_c.lib "ReleaseMARE2DCSEM.obj" "c:mhoversmare2d_v2.1_intel eleaseSuper_LU.lib"Link: executing 'link'
Super_LU.lib(c_fortran_zgssv.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _sprintf already defined in LIBCMT.lib(sprintf.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: ___iob_func already defined in LIBCMT.lib(_file.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _printf already defined in LIBCMT.lib(printf.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _fprintf already defined in LIBCMT.lib(fprintf.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _exit already defined in LIBCMT.lib(crt0dat.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _free already defined in LIBCMT.lib(free.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _malloc already defined in LIBCMT.lib(malloc.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _calloc already defined in LIBCMT.lib(calloc.obj)
MSVCRT.lib(MSVCR80.dll) : error LNK2005: _fflush already defined in LIBCMT.lib(fflush.obj)
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
Releasemare2d_v2.1_intel.exe : fatal error LNK1169: one or more multiply defined sy mbols found
It says to use /NODEFAULTLIB:library, but
1) where do I do this and
2) does library = LIBCMT.lib?
thanks
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think, you are trying to build you project as "multi-thread DLL" (/MD option). MKL libraries built as "multi-thread". And you have conflict of "multi-thread DLL" and "multi-thread" run-time libraries here.
Change value of this field "solution properties --> configuration properties --> C/C++ --> Code Generation --> Runtime library" to "multi-thread".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks very much , that did it.
cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Now I have added the MPICH2 libraries and am getting:
Linking...
Link /OUT:"Releasemare2d_v3.exe
" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:Program FilesMPICH2lib" /LIBPATH:"C:Program FilesIntelMKL9.1ia32lib" /MANIFEST /MANIFESTFILE:"C:mhoversmare2d_v3 eleasemare2d_v3.exe.intermediate.manifest" /SUBSYSTEM:CONSOLE /STACK:250000000,250000000 fmpich2.lib mkl_c.lib "Releasemare2d_modules.obj" "ReleaseMARE2DCSEM_V3_par.obj" "Releaseslave_server.obj" "Releasedipole1d.obj" "Releasempi_fe_forward.obj" "Releasewritesolution.obj" "Releasemare2d_input_file_scan.obj" "Release eadsite.obj" "Releasecsem2dfw_mpi.obj" "Releaseallocate_local_arrays.obj" "Releasemaster_forward.obj" "Release estconvergence.obj" "Releasefill_local_solmtx.obj" "Release eadmesh.obj" "Releaseallocate_master_arrays.obj" "Release eadwavenum.obj" "Releasedeallocate_local_arrays.obj" "Releasemesh_file_copy.obj" "Releaseupdatefilenames_mpi.obj" "Releaseintegratefilds_mpi.obj" "Release eadrunfile.obj" "Releaseallocatecsem2dfw_mpi.obj" "c:mhoversmare2d_v3 eleaseSuperLU_SRC.lib"Link: executing 'link'
SuperLU_SRC.lib(c_fortran_zgssv.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
LIBCMT.lib(invarg.obj) : error LNK2005: __invoke_watson already defined in MSVCRT.lib(MSVCR80.dll)
LIBCMT.lib(setlocal.obj) : error LNK2005: __configthreadlocale already defined in MSVCRT.lib(MSVCR80.dll)
LIBCMT.lib(tidtable.obj) : err or LNK2005: __encode_pointer already defined in MSVCRT.lib(MSVCR80.dll)
LIBCMT.lib(tidtable.obj) : error LNK2005: __decode_pointer already defined in MSVCRT.lib(MSVCR80.dll)
LIBCMT.lib(printf.obj) : error LNK2005: _printf already defined in MSVCRT.lib(MSVCR80.dll)
LIBCMT.lib(_file.obj) : error LNK2005: ___iob_func already defined in MSVCRT.lib(MSVCR80.dll)
LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in MSVCRT.lib(MSVCR80.dll)
LIBCMT.lib(crt0dat.obj) : error LNK2005: __initterm_e already defined in MSVCRT.lib(MSVCR80.dll)
LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRT.lib(MSVCR80.dll)
LIBCMT.lib(crt0dat.obj) : error LNK2005: __exit already defined in MSVCRT.lib(MSVCR80.dll)
LIBCMT.lib(crt0dat.obj) : error LNK2005: __cexit already defined in MSVCRT.lib(MSVCR80.dll)
LIBCMT.lib(mlock.obj) : error LNK2005: __unlock already defined in MSVCRT.lib(MSVCR80.dll)
LIBCMT.lib(mlock.obj) : error LNK2005: __lock already defined in MSVCRT.lib(MSVCR80.dll)
LIBCMT.lib(winxfltr.obj) : error LNK2005: __XcptFilter already defined in MSVCRT.lib(MSVCR80.dll)
LIBCMT.lib(calloc.obj) : error LNK2005: _calloc already defined in MSVCRT.lib(MSVCR80.dll)
LIBCMT.lib(crt0.obj) : error LNK2005: _mainCRTStartup already defined in MSVCRT.lib(crtexe.obj)
LIBCMT.lib(fflush.obj) : error LNK2005: _fflush already defined in MSVCRT.lib(MSVCR80.dll)
LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in MSVCRT.lib(cinitexe.obj)
LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in MSVCRT.lib(cinitexe.obj)
LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in MSVCRT.lib(cinitexe.obj)
LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in MSVCRT.lib(cinitexe.obj)
LIBCMT.lib(hooks.obj) : error LNK2005: "void __cdecl terminate(void)
" (?terminate@@YAXXZ) already defined in MSVCRT.lib(MSVCR80.dll)LIBCMT.lib(errmode.obj) : error LNK2005: ___set_app_type already defined in MSVCRT.lib(MSVCR80.dll)
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
Releasemare2d_v3.exe : fatal error LNK1169: one or more multiply defined symbols found
mare2d_v3 - 24 error(s), 2 warning(s)
I have compiled the C library with /MT just as befor when it worked. Is this some incompatibility with the MPICH2 libraries?
thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page