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

linking errors

tomsawyer
Beginner
1,005 Views

Hi

we have a code which works while using CVF version 6.6A, but when we attempted to use the same code on a different maching using the same CVF version 6.6A, it generates some errors. I have given a sample fortran file REGRANAL.F90 that produces the errors after compilation and linking.

E:ALCDvf>FL32 REGRANAL.F90 /G5 /Ox /MW /c
Compaq Visual Fortran Optimizing Compiler Version 6.6 (Update A)
Copyright 2001 Compaq Computer Corp. All rights reserved.

REGRANAL.F90

E:ALCDvf>LINK REGRANAL.OBJ RCDLNG.OBJ JOBTIM.OBJ AMSSCLIB.LIB /NODEFAULTLIB:LIBC.LIB /SUBSYSTEM:WINDOWS
Microsoft Incremental Linker Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

REGRANAL.OBJ : error LNK2001: unresolved external symbol _for_read_dir_i8
REGRANAL.OBJ : error LNK2001: unresolved external symbol _for_write_dir_i8
REGRANAL.exe : fatal error LNK1120: 2 unresolved externals

Please note that the machine that produces the errors does not have any previous CVF versions loaded.

Please let me know of the possible scenarios that might explain this.

Thanks

Tom Sawyer
0 Kudos
8 Replies
Steven_L_Intel1
Employee
1,005 Views
The other system does not have a proper install of 6.6A, it has older libraries, or the wrong libraries are being linked to. There was a change in 6.6A that added routines to the Fortran libraries, and your compiled code is referencing them.

You may want to check that it's actually the installed libraries being linked against.

Steve
0 Kudos
tomsawyer
Beginner
1,005 Views

Steve

can you help if there is a way to fix these errors in my machine that uses only CVF wersion 6.6A.

Tom
0 Kudos
Steven_L_Intel1
Employee
1,005 Views
There's some inconsistency in here somewhere, but I can't see it from your post. Why are you using LINK to link rather than DF /libs:qwin?

Please write to vf-support@compaq.com and attach a zip archive of the files used to build this - the .f90 as well as the other .OBJ and .LIB files. Please also include the output of a SET command issued from this command prompt session.

Steve
0 Kudos
kdkeefer
Beginner
1,005 Views
Steve,
It's not really my place to offer suggestions to your responses, but someone posted an identical error (arising from Integer*8 variables in I/O statements) a few weeks ago and I though you suggested the free upgrade to CVF 6.6B as a possible fix.
Regards,
Keith
0 Kudos
Steven_L_Intel1
Employee
1,005 Views
Well, yes, but I figured Tom had some reason to stay with 6.6A. And really, it SHOULD work - and does for nearly everyone else. I'd like to understand what is causing the problem.

Steve
0 Kudos
tomsawyer
Beginner
1,005 Views

actually the same problem does persist even after updating to 6.6B which is puzzling, since a set of six new run-time library routines has been added since version 6.6A: for_delete_i8, for_find_i8, for_read_dir_i8, for_read_dir_fmt_i8, for_write_dir_i8 and for_write_dir_fmt_i8.

need to know actually if the libraries are accessed rightly. in my case its a quickwin application.

Tom
0 Kudos
Steven_L_Intel1
Employee
1,005 Views
Tom,

My guess is that you have in your LIB path a folder containing an old copy of CVF libraries. The libraries that should be referenced are dformt.lib and dfqwin.lib. Search your system to see if there is more than one copy of dformt.lib.

Steve
0 Kudos
tomsawyer
Beginner
1,005 Views

thanks steve.
0 Kudos
Reply