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

Mixed language link error

john_lord
Novice
549 Views
I am trying to call a subroutine compiled using CVF6.6a from C++ .NET. I get the following link error:-

bessel_start error LNK2005: __matherr already defined in LIBCD.lib(matherr.obj)

What library settings do I need to avoid the conflict between FORTRAN and C libraries?
0 Kudos
2 Replies
Steven_L_Intel1
Employee
549 Views
The problem here is a library order issue, due to the brain-dead way that MS puts __matherr in the MSVC libraries. The solution is to ensure that the CVF libraries are searched first - do this by putting DFOR.LIB in the list of libraries/objects to be searched in the linker settings dialog.

Steve
0 Kudos
rcampbell1979
Beginner
549 Views
Thanks so much!
0 Kudos
Reply