[Paraview] Fortran in ParaView plugins

Berk Geveci berk.geveci at kitware.com
Thu Oct 8 09:37:10 EDT 2009


This sort of thing happens when a 3rd party library (I guess the
Fortran library in this case) is linked against a different C library
than ParaView is linking against. In this case, one of the is using
libcmt.lib and the other one is msvcrt.lib. There are linker flags
that control which one you use but this is where my knowledge of
Windows linking ends :-)

On Tue, Oct 6, 2009 at 5:54 AM, Paul Edwards <paul.m.edwards at gmail.com> wrote:
> Hi,
>
> I have some plugins to ParaView that use Fortran and now I am having
> problems on windows with linking (it all works for GNU and linux).  I am
> using nmake makefiles with visual studio 2008 and intel fortran 10.1.  These
> are the link errors:
>
> 8<-----------------------------------------------------------------------
> LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in
> MSVCRT.lib(MSVCR90.dll)
> LIBCMT.lib(crt0dat.obj) : error LNK2005: __initterm_e already defined in
> MSVCRT.lib(MSVCR90.dll)
> LIBCMT.lib(invarg.obj) : error LNK2005: __invalid_parameter_noinfo already
> defined in MSVCRT.lib(MSVCR90.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(MSVCR90.dll)
> LIBCMT.lib(winxfltr.obj) : error LNK2005: ___CppXcptFilter already defined
> in MSVCRT.lib(MSVCR90.dll)
> LIBCMT.lib(crtheap.obj) : error LNK2005: __malloc_crt already defined in
> MSVCRT.lib(MSVCR90.dll)
> LIBCMT.lib(tidtable.obj) : error LNK2005: __encode_pointer already defined
> in MSVCRT.lib(MSVCR90.dll)
> LIBCMT.lib(tidtable.obj) : error LNK2005: __encoded_null already defined in
> MSVCRT.lib(MSVCR90.dll)
> LIBCMT.lib(tidtable.obj) : error LNK2005: __decode_pointer already defined
> in MSVCRT.lib(MSVCR90.dll)
> LIBCMT.lib(mlock.obj) : error LNK2005: __unlock already defined in
> MSVCRT.lib(MSVCR90.dll)
> LIBCMT.lib(mlock.obj) : error LNK2005: __lock already defined in
> MSVCRT.lib(MSVCR90.dll)
>    Creating library CalculateSpanSMPlugin.lib and object
> CalculateSpanSMPlugin.exp
> 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
> libifcoremt.lib(for_main.obj) : error LNK2019: unresolved external symbol
> _MAIN__ referenced in function _main
> CalculateSpanSMPlugin.dll : fatal error LNK1120: 1 unresolved externals
> LINK failed. with 1120
> NMAKE : fatal error U1077:
> 'D:\scratch\ss02-build\cmake-2.6.4-win32-x86\bin\cmake.exe' : return code
> '0xffffffff'
> Stop.
> NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
> 9.0\VC\BIN\nmake.exe"' : return code '0x2'
> Stop.
> NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
> 9.0\VC\BIN\nmake.exe"' : return code '0x2'
> Stop.
> ----------------------------------------------------------------------->8
>
> Can anyone help?  Am I missing something from my CMakeLists.txt file?  And,
> is it just me or is compilation so much more complicated on windows?!
>
> Any help would be appreciated,
> Paul
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>
>


More information about the ParaView mailing list