Using both dynamic and static library by fortran

Using both dynamic and static library by fortran

I have a code which is using static libraries and now I wanna to add a dynamic dll library to that. When I import the new dll library I receive the following error:

libifcoremt.lib(for_init.obj) : error LNK2005: _for_set_fpe_ already defined in libifcoremd.lib(libifcoremd.dll)
libifcoremt.lib(for_vm.obj) : error LNK2005: _for_allocate already defined in libifcoremd.lib(libifcoremd.dll)
libifcoremt.lib(for_vm.obj) : error LNK2005: _for_alloc_allocatable already defined in libifcoremd.lib(libifcoremd.dll)
libifcoremt.lib(for_vm.obj) : error LNK2005: _for_dealloc_allocatable already defined in libifcoremd.lib(libifcoremd.dll)
libifcoremt.lib(for_vm.obj) : error LNK2005: _for_check_mult_overflow already defined in libifcoremd.lib(libifcoremd.dll)
libifcoremt.lib(for_diags_intel.obj) : error LNK2005: _for_emit_diagnostic already defined in libifcoremd.lib(libifcoremd.dll)
libifcoremt.lib(for_reentrancy.obj) : error LNK2005: _for_set_reentrancy already defined in libifcoremd.lib(libifcoremd.dll)
libifcoremt.lib(for_close.obj) : error LNK2005: _for_close already defined in libifcoremd.lib(libifcoremd.dll)
libifcoremt.lib(for_open.obj) : error LNK2005: _for_open already defined in libifcoremd.lib(libifcoremd.dll)
libifcoremt.lib(for_wseq.obj) : error LNK2005: _for_write_seq already defined in libifcoremd.lib(libifcoremd.dll)
libifcoremt.lib(for_wseq.obj) : error LNK2005: _for_write_seq_xmit already defined in libifcoremd.lib(libifcoremd.dll)
newnames.obj : error LNK2019: unresolved external symbol __imp__DLL_SETSEED@0 referenced in function _MAIN__

for runtime library option I have checked all the options (multithreaded dll, multithreaded, debug multithreaded, debug multithreaded dll, ...), however the problem has not been solved.

Can anybody help me?

publicaciones de 2 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

In the static library, change the property "Fortran > Libraries > Disable default library search rules" to Yes and rebuild it.

It looks as if you are also using the STDCALL or CVF calling convention - do you need that? I suggest changing the calling convention to Default in all your projects.

Steve

Inicie sesión para dejar un comentario.