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

LNK2005 error after porting from CVF to intel

Wee_Beng_T_
Beginner
809 Views

Hi,

after porting my pure fortran project from CVF to intel, I met into problems while linking.

Initially, it was DFPORT.LIB,DFCONSOL.LIB and DFORMT.LIB not found. Following instructions from the forum, I copied these lib files over to C:Program FilesIntelCompilerFortran9.0IA32Lib.

Then I got these errors:

cutcell error LNK2005: _for__reentrancy_cleanup already defined in dformt.lib(for_reentrancy.obj)
cutcell error LNK2005: _for__disable_asynch_deliv_private already defined in dformt.lib(for_reentrancy.obj)
cutcell error LNK2005: _for__enable_asynch_deliv_private already defined in dformt.lib(for_reentrancy.obj)
cutcell error LNK2005: _for__once_private already defined in dformt.lib(for_reentrancy.obj)
cutcell error LNK2005: _for__reentrancy_init already defined in dformt.lib(for_reentrancy.obj)
cutcell error LNK2005: _for__reentrancy_mode already defined in dformt.lib(for_reentrancy.obj)
cutcell error LNK2005: _for__reentrancy_initialized already defined in dformt.lib(for_reentrancy.obj)
cutcell error LNK2005: _for__static_threadstor_private already defined in dformt.lib(for_reentrancy.obj)
cutcell error LNK2005: __QWINGethWnd already defined in ifconsol.lib(for_m_console.obj)
cutcell error LNK2005: __QWINTGethFrame already defined in ifconsol.lib(for_m_console.obj)
cutcell error LNK2005: __QWINGetFocus already defined in ifconsol.lib(for_m_console.obj)
cutcell error LNK2005: __qw32used already defined in ifconsol.lib(for_m_console.obj)
cutcell error LNK2019: unresolved external symbol ___pxcptinfoptrs referenced in function _GETEXCEPTIONPTRSQQ@0
cutcell fatal error LNK1120: 1 unresolved externals

etc...

So what's the solution? Or how can I avoid requiring those CVF lib in the 1st place. I have some other lib files (PETSc, a linear solver, which was compiled using vc 6) and I guess that's the problem.

Thanks alot!

0 Kudos
2 Replies
Steven_L_Intel1
Employee
809 Views
Where did you see instructions to copy those libraries? That was not a good thing to do. Remove them.

If you have any libraries that were compiled with CVF, you must recompile them with Intel Fortran. The VC6 libraries should be ok unless you're using VS2005, in which case you're going to have to recompile those too as otherwise you'll get errors about libc.liib.

With the CVF libraries removed, what errors do you see?
0 Kudos
Wee_Beng_T_
Beginner
809 Views
Hi thanks steve! I have recompiled my PETSc solver library using intel ifort and now it's working fine.
0 Kudos
Reply