[CMake] FortranCInterface not working with 3.9.0 with Intel 2015

Bill Hoffman bill.hoffman at kitware.com
Sun Dec 10 17:39:52 EST 2017


Thanks for sending the files.  I think I might have found something. 
The FortranCInterface.exe is not linking because of mismatched linker 
commands.  Here are the errors:

Did you change any of the default compiler/linker flags?  It looks like 
it is mixing run time libraries somehow.


[100%] Linking Fortran executable FortranCInterface.exe

LINK: command "xilink /nologo 
@CMakeFiles\FortranCInterface.dir\objects1.rsp 
/out:FortranCInterface.exe /implib:FortranCInterface.lib 
/pdb:C:\winsame\cary\usimall\builds\ulixes\ser\CMakeFiles\FortranCInterface\FortranCInterface.pdb 
/version:0.0 /machine:x64 /INCREMENTAL:NO /subsystem:console symbols.lib 
myfort.lib user32.lib /MANIFEST 
/MANIFESTFILE:FortranCInterface.exe.manifest" failed (exit code 1169) 
with the following output:
xilink: executing 'link'

LIBCMT.lib(winapisupp.obj) : error LNK2005: 
__crtSetUnhandledExceptionFilter already defined in MSVCRT.lib(MSVCR120.dll)

LIBCMT.lib(crtheap.obj) : error LNK2005: _calloc_crt already defined in 
MSVCRT.lib(MSVCR120.dll)

LIBCMT.lib(crt0dat.obj) : error LNK2005: _amsg_exit already defined in 
MSVCRT.lib(MSVCR120.dll)

LIBCMT.lib(crt0dat.obj) : error LNK2005: _cexit already defined in 
MSVCRT.lib(MSVCR120.dll)

LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit already defined in 
MSVCRT.lib(MSVCR120.dll)

LIBCMT.lib(crt0dat.obj) : error LNK2005: _initterm_e already defined in 
MSVCRT.lib(MSVCR120.dll)

LIBCMT.lib(crt0dat.obj) : error LNK2005: exit already defined in 
MSVCRT.lib(MSVCR120.dll)

LIBCMT.lib(mlock.obj) : error LNK2005: _lock already defined in 
MSVCRT.lib(MSVCR120.dll)

LIBCMT.lib(mlock.obj) : error LNK2005: _unlock already defined in 
MSVCRT.lib(MSVCR120.dll)




-- 
Bill Hoffman
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
bill.hoffman at kitware.com
http://www.kitware.com
518 881-4905 (Direct)
518 371-3971 x105
Fax (518) 371-4573


More information about the CMake mailing list