- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm asking your help because I am having a strange error message when I try to build a program using visual studio 2008. This message is:
Erreur 1 fatal error LNK1181: impossible d'ouvrir le fichier en entre 'dfor.lib' LINK
It's in french, but the translation of this message would be:
error 1 fatal error link 1181: cannot open the the file dfor.lib
I never used dfor.lib in my source files, it does not even exist on my computer. I checked many times my files, there's no reason I'd need this lib to build my program.
Please, I really need help, I don't understabnd this error message.
Thanks.
I'm asking your help because I am having a strange error message when I try to build a program using visual studio 2008. This message is:
Erreur 1 fatal error LNK1181: impossible d'ouvrir le fichier en entre 'dfor.lib' LINK
It's in french, but the translation of this message would be:
error 1 fatal error link 1181: cannot open the the file dfor.lib
I never used dfor.lib in my source files, it does not even exist on my computer. I checked many times my files, there's no reason I'd need this lib to build my program.
Please, I really need help, I don't understabnd this error message.
Thanks.
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You do not want CVF, most likely.
Dfor.lib is the "default" (run-time) library which comes with CVF; no CVF-compiled program could work without it. Intel Fortran has its own run-time libraries, named libifcore*.lib, and those will probably get in conflict with dfor.lib even if you get one.
However, compiled .obj and .lib files may contain references to libraries they want. When linker finds such reference, it wants to pull in the referenced library, and complains when it fails.
Your problem is that, among your sources and libraries, there is an old .lib, probably from a third party, compiled with CVF, which references dfor.lib. You did not tell us so far which one it is.
The .lib files are not compatible among compilers, sorry. You cannot take a .lib file and just magically fix it: you have to ask the vendor for a newer version, or get its sources so that you can recompile it yourself. You cannot have both dfor.lib and libifcore*.lib mixed in the same project, so it wouldn't do you any good even if we provide you with one.
Dfor.lib is the "default" (run-time) library which comes with CVF; no CVF-compiled program could work without it. Intel Fortran has its own run-time libraries, named libifcore*.lib, and those will probably get in conflict with dfor.lib even if you get one.
However, compiled .obj and .lib files may contain references to libraries they want. When linker finds such reference, it wants to pull in the referenced library, and complains when it fails.
Your problem is that, among your sources and libraries, there is an old .lib, probably from a third party, compiled with CVF, which references dfor.lib. You did not tell us so far which one it is.
The .lib files are not compatible among compilers, sorry. You cannot take a .lib file and just magically fix it: you have to ask the vendor for a newer version, or get its sources so that you can recompile it yourself. You cannot have both dfor.lib and libifcore*.lib mixed in the same project, so it wouldn't do you any good even if we provide you with one.
Link Copied
13 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is Compaq Visual Fortran library.
Have you used CVF in the past?
Are you using IVF now?
Is your IVF project a project converted from a CVF project?
Have you tried a Clean build?
Have you used CVF in the past?
Are you using IVF now?
Is your IVF project a project converted from a CVF project?
Have you tried a Clean build?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
First, thanks for your answer. And to answer your questions:
1) I never used CVF before.
2) Yes, now I am using IVF and as an IDE Visual Studio 2008.
3) My project isn't aproject converted from a CVF project and I tried a clean build but that doesn't change anything.
I've just read on the troubleshooting page of this site that I have to re-compile the CVF libraries. Is this really the only solution? If it's the case, please howto do this?
1) I never used CVF before.
2) Yes, now I am using IVF and as an IDE Visual Studio 2008.
3) My project isn't aproject converted from a CVF project and I tried a clean build but that doesn't change anything.
I've just read on the troubleshooting page of this site that I have to re-compile the CVF libraries. Is this really the only solution? If it's the case, please howto do this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You don't need to recompile the CVF libraries, you need to recompile any libraries that were built with CVF.
One (or maybe more) of the libraries that you are linking against in your project, were built with CVF. It may be something that you are using from a colleague, it may be a third-party application. But, something you are linking against, had been built with CVF.
So, the best thing to do right now is to look at what libraries you are linking against.
- Lorri
One (or maybe more) of the libraries that you are linking against in your project, were built with CVF. It may be something that you are using from a colleague, it may be a third-party application. But, something you are linking against, had been built with CVF.
So, the best thing to do right now is to look at what libraries you are linking against.
- Lorri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So, if I unederstood well, it would be better if I recompile the libraries I used in this program?
When I try to open a .lib file with visual studio in order to compile it, a .txt file opens with illisable characters and no possibility to compile. Please, how can I compile this kind of files?
When I try to open a .lib file with visual studio in order to compile it, a .txt file opens with illisable characters and no possibility to compile. Please, how can I compile this kind of files?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Think of a library as a coordinated collection of .obj files. Often, a library is produced by concatenating .OBJ files and adding a dictionary/index. In Unix, such a (static) library is called an archive, and is given the suffix .a .
To build a library from sources, you compile the sources (.for or .f or .f90) using the Fortran (and, possibly, C) compiler, and use the librarian (LIB.EXE) to build the library from the object files.
If you use libraries other than those that came with CVF, and you do not have sources, you will have to (i) obtain the CVF runtime redistributables (available from HP) and (ii) compile your sources in Compaq compatibility mode or add compiler directives so that the custom library routines are called with STDCALL linkage.
You need to read the relevant chapters of the Intel Fortran User's Guide.
To build a library from sources, you compile the sources (.for or .f or .f90) using the Fortran (and, possibly, C) compiler, and use the librarian (LIB.EXE) to build the library from the object files.
If you use libraries other than those that came with CVF, and you do not have sources, you will have to (i) obtain the CVF runtime redistributables (available from HP) and (ii) compile your sources in Compaq compatibility mode or add compiler directives so that the custom library routines are called with STDCALL linkage.
You need to read the relevant chapters of the Intel Fortran User's Guide.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much for your help. I think I understand what I have to do know.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just one more question please. Is it normal that the file dfor.lib doesn't exist on my computer??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't think there was a dfort.lib. You must mean dfor.lib or dfport.lib In ifort, the functionality of dfport.lib is replaced by ifport. Such functions should be declared by USE IFPORT, whether or not they were declared by equivalent CVF/DVF methods. Objects which depend on dfor or dfport should be rebuilt.
As mentioned by a later post, these .lib files would be present only in an installation of the CVF compiler.
As mentioned by a later post, these .lib files would be present only in an installation of the CVF compiler.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tim, that's not correct. dfor.lib is the equivalent of libifcore.lib - it provides the "core" Fortran language support. You are thinking of dfport.lib.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
"Is it normal that the file dfor.lib doesn't exist on my computer?"
Quite so. If you had never had Compaq/Digital Fortran installed on your system, or any other application that used the CVF runtime (e.g. Matlab), there is no reason why dfor.lib should be on your system. It is certainly not distributed with Windows.
In fact, dfor.lib has less chance of being found on a randomly chosen Windows PC than does dfor.dll.
Quite so. If you had never had Compaq/Digital Fortran installed on your system, or any other application that used the CVF runtime (e.g. Matlab), there is no reason why dfor.lib should be on your system. It is certainly not distributed with Windows.
In fact, dfor.lib has less chance of being found on a randomly chosen Windows PC than does dfor.dll.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yeah sorry, I was meaning dfor.lib (I was tired and thinking fortran :p)
So I have no other options than installing a CVF compiler?? I just installed Intel Visual Fortran, how dfor.lib can be not provided with it?? Very strange!!
So I have no other options than installing a CVF compiler?? I just installed Intel Visual Fortran, how dfor.lib can be not provided with it?? Very strange!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You do not want CVF, most likely.
Dfor.lib is the "default" (run-time) library which comes with CVF; no CVF-compiled program could work without it. Intel Fortran has its own run-time libraries, named libifcore*.lib, and those will probably get in conflict with dfor.lib even if you get one.
However, compiled .obj and .lib files may contain references to libraries they want. When linker finds such reference, it wants to pull in the referenced library, and complains when it fails.
Your problem is that, among your sources and libraries, there is an old .lib, probably from a third party, compiled with CVF, which references dfor.lib. You did not tell us so far which one it is.
The .lib files are not compatible among compilers, sorry. You cannot take a .lib file and just magically fix it: you have to ask the vendor for a newer version, or get its sources so that you can recompile it yourself. You cannot have both dfor.lib and libifcore*.lib mixed in the same project, so it wouldn't do you any good even if we provide you with one.
Dfor.lib is the "default" (run-time) library which comes with CVF; no CVF-compiled program could work without it. Intel Fortran has its own run-time libraries, named libifcore*.lib, and those will probably get in conflict with dfor.lib even if you get one.
However, compiled .obj and .lib files may contain references to libraries they want. When linker finds such reference, it wants to pull in the referenced library, and complains when it fails.
Your problem is that, among your sources and libraries, there is an old .lib, probably from a third party, compiled with CVF, which references dfor.lib. You did not tell us so far which one it is.
The .lib files are not compatible among compilers, sorry. You cannot take a .lib file and just magically fix it: you have to ask the vendor for a newer version, or get its sources so that you can recompile it yourself. You cannot have both dfor.lib and libifcore*.lib mixed in the same project, so it wouldn't do you any good even if we provide you with one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok thank you for this clear explanation :)

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page