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

dfor.lib link problem

royxu
Beginner
1,188 Views

Hello,

Recently I tried to use Intel Fortran compiler to compiler my programs which were originally written in CVF. I converted all programswithin Intel compiler, but I still got this error messages.I don't think it is because there are any CVF-compiled object file or library file using in my programs. I remember I only use self-made NAG library file which was recompiled with Intel compiler, other than that, I use standard library.Any suggestions will be welcomed.

1>------ Build started: Project: version2ewoc, Configuration: Debug Win32 ------

1>Compiling manifest to resources...

1>Linking...

1>Fatal error cannot open "dfor.lib"

1>Link: error: problem during multi-file optimization compilation (code 1)

1>Link: error: problem during multi-file optimization compilation (code 1)

1>

1>Build log written to "file://C:Documents and SettingsVisual Fortranversion2ewocDebugBuildLog.htm"

1>version2ewoc build failed.

1>

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

0 Kudos
11 Replies
Steven_L_Intel1
Employee
1,188 Views
Either you are still linking in an object or library compiled with CVF or there is an explicit reference to dfor.lib in your project. With a good file search tool (not the one in Windows which will silently skip files it doesn't recognize- I recommend Agent Ransack) search all your project files, including the objects and libraries, for the string "dfor.lib". You'll find the culprit.
0 Kudos
royxu
Beginner
1,188 Views

Thanks! Steve.

I did find dfor.lib by using Agent Ransack and searching the whole C drive. It is located at

C:Program FilesVisual FortranDF98LIBDFOR.LIB

Ok,the file seems to be in compaq version.Since my several source files in my project have those statement "use DFLIB", I wonder whether it is the reason causing this link problem. MeanwhileI thought Intel should have a similar library for Dfor.lib so I don't need remove "use DFLIB" from the program. Am I right?

Thanks!

Roy

0 Kudos
Steven_L_Intel1
Employee
1,188 Views

Sorry, I did not make myself clear. I did not suggest that you search for a file named dfor.lib - I asked you to search your project files (including .obj and .lib) for files containing the text "dfor.lib". This may be in the .vfproj project file or may be in .obj or .lib files that were not recompiled using Intel Fortran.

The USE DFLIB is notrelated and works ok in Intel Visual Fortran.

0 Kudos
royxu
Beginner
1,188 Views

I searched again and did find some files containing text "dfor.lib", but all of them are not in my current project. For the current project, I only found buildlog.html contains "dfor.lib".

Will all those CVF-compiled object file for other projects affectthe current project I tried to link?

Thanks!

Roy

0 Kudos
Steven_L_Intel1
Employee
1,188 Views

If those objects are not referenced in your current project, then there should be no effect.

If you cannot find the problem, please submit an issue to Intel Premier Support and attach a ZIP of your project as it appears now (including object files.) We'll take a look.

0 Kudos
royxu
Beginner
1,188 Views

Good news! I solved the problem but I don't know why.:-).

I was planning to zip all the file and send it to you. My source files are in different folders, so I create a new folder in order to zip easily. I put all source files and self-compiled libraries in the new folder, then create a new Intel Fortran project, and compile and build. It works! I guess the problem before is that I have source files and object, library file in different folders.

Thanks!

Roy

0 Kudos
Steven_L_Intel1
Employee
1,188 Views
That by itself is not a problem, but you very lilkely had an old object or library file that had not been recompiled.
0 Kudos
royxu
Beginner
1,188 Views

I will check my programs again and if there is any problem, I will send to technique support. Thanks!

Roy

0 Kudos
William_Sailor
Beginner
1,188 Views

Sorry, I did not make myself clear. I did not suggest that you search for a file named dfor.lib - I asked you to search your project files (including .obj and .lib) for files containing the text "dfor.lib". This may be in the .vfproj project file or may be in .obj or .lib files that were not recompiled using Intel Fortran.

The USE DFLIB is notrelated and works ok in Intel Visual Fortran.

Hi Steve,

I think I am in the same boat as this guy. I am trying to use some libraries (CERN libraries) compiled in 2000 and 2001 with Compac fortran. Simply opening the file with ultraedit shows that dfor.lib is listed inside the library a few hundred times. How do I defeat this problem without recompiling source code?
0 Kudos
Steven_L_Intel1
Employee
1,188 Views
William,

The only thing I can suggest is to link the libraries into a DLL, which requires that you have CVF installed. Then, depending on what the libraries did (no I/O, no assumed-shape array arguments, etc.) and with some care on interfaces, you could call it from Intel Fortran.

Otherwise, you'll need to look for a copy of the libraries compiled with Intel Fortran, or the source so you can compile them yourself.
0 Kudos
William_Sailor
Beginner
1,188 Views
William,

The only thing I can suggest is to link the libraries into a DLL, which requires that you have CVF installed. Then, depending on what the libraries did (no I/O, no assumed-shape array arguments, etc.) and with some care on interfaces, you could call it from Intel Fortran.

Otherwise, you'll need to look for a copy of the libraries compiled with Intel Fortran, or the source so you can compile them yourself.


Thanks for the suggestions. The libraries have not been built with Intel Fortran for Windows, but I do have the source!
0 Kudos
Reply