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

Problem linking libraries

simon_breton
Beginner
358 Views

Hello,

I am a new user of fortran and I am using Intel Visual Fortran with the command line, using a makefile.

I am using two NAG subroutines. Up to now I have replaced them with empty subroutines to be able to compile, but now I want to use them.

I have to say that I will be using the version of the libraries for compaq visual fortran. As is is written on page 3 of the document Porting Applications from

Compaq Visual Fortran to Intel Visual Fortran Compilers that All CVF library routines are supported (on Intel Visual Fortran), I believe this should not be a problem.

I have problems linking and compiling the libraries.

I tried with a very simple example program suggested in the document Tutorial for the NAG Fortran 90 Library which consists in using the following program to call the the subroutine nag_lib_ident:

PROGRAM tutorial_ex1a

USE nag_lib_support, ONLY : nag_lib_ident

IMPLICIT NONE

CALL nag_lib_ident

END PROGRAM tutorial_ex1a

When I type the command

tutorial_ex1a.f90 /o /LINK nagfl90.lib

I get the error message

LINK : fatal error LNK1104: cannot open file 'dfor.lib'

I really do not know what the problem is.

Can you help me with this?

Thanks a lot,

S. Breton

0 Kudos
3 Replies
TimP
Honored Contributor III
358 Views
Support for CVF library calls in ifort is at the source level, not at binary level. There are very limited options for use of libraries built for CVF.
0 Kudos
simon_breton
Beginner
358 Views

Hello,

Thank you for your answer.

Are you 100% sure that this problem with cannot open file 'dfor.lib' is related to library compatibility?

I am not sure I understand the difference between source level and binary level support.

If this is really the problem, that means I would have to buy the libraries for intel visual fortran? There is nothing I can do with the one I have for compaq visual fortran?

Thank you,

S. Breton

0 Kudos
Steven_L_Intel1
Employee
358 Views
The problem is that you are trying to link in a .lib that was built with CVF. This does not work. All Fortran code must be recompiled with Intel Visual Fortran in order to link with Intel Fortran-compiled objects.

So, yes, you will have to obtain from NAG the version of their library built for use with Intel Visual Fortran.
0 Kudos
Reply