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

LINK : fatal error LNK1104: cannot open file 'IFWIN.LIB'

pecan204
Beginner
2,692 Views
Can anyone point out what settings may eliminate the link error below?
The project is a C++ dll calling a fortran static lib.

LINK : fatal error LNK1104: cannot open file 'IFWIN.LIB'

Thanks

0 Kudos
11 Replies
Jugoslav_Dujic
Valued Contributor II
2,692 Views
Your static library references "Ifwin.lib", but the linker can't find it.

Add "Ifwin.lib" to the list of libraries (Properties/Linker/Input/Additional dependencies).

If you still get the same error, also add the path of its directory (C:Program FilesIntelFortrancompiler80IA32LIB or like) to Linker/General/Additional library directories.

Jugoslav
0 Kudos
Steven_L_Intel1
Employee
2,692 Views
This is what I would recommend: Add the Intel Fortran IA32LIB folder (for example, C:Program FilesIntelCompilerFortran9.0IA32Lib) to Tools..Options..Projects..VC++ Directories..Library Files.

Static library projects where the main program is not Fortran should also set the project property Fortran..Libraries..Disable default library search rules to No.
0 Kudos
Jugoslav_Dujic
Valued Contributor II
2,692 Views
Ah, there it is... I also wanted to recommend that option, but couldn't find it :-). Thanks Steve.

Jugoslav
0 Kudos
pecan204
Beginner
2,692 Views

Yes , I do have that path already listed. I also compiled it both ways with disable default search but the link error is still there.

Is there any other setting?

Thanks

Ken

0 Kudos
Steven_L_Intel1
Employee
2,692 Views
If you're getting the message that it can't open IFWIN.LIB, then it clearly knows that it wants to look for that library. Note that when you're building a C++ project that VS.NET uses the list of libraries in Tools..Options..Projects..VC++ Directories. Make sure that the Intel Fortran LIB folder is listed there. There is no "other setting", though you can brute-force it in various ways (such as adding the path explicitly in the project Linker properties or even adding ifwin.lib to your C++ project as if it were a source file (not recommended in this context.)
0 Kudos
pecan204
Beginner
2,692 Views

I added the lib file to the project and the original link error disappeared but another .lib file is now not seen (ifcor??.lib).

I decided to reload the the compiler but upon attemptiong the installer wants to unistall Visuall C++. Is that the only way to reinstall the latest Intel Fortran compiler? I don't want to take a chance at messing something else unrelated up.

Thanks for some help.

Ken

0 Kudos
Steven_L_Intel1
Employee
2,692 Views
I think you're misunderstanding the message. (Or you may be using an old version with a confusing message.) It's ok to reinstall the compiler and then reinstall the Visual Studio integration.

I am very puzzled at the symptoms you are seeing. If they persist, please report the problem to Intel Premier Support.
0 Kudos
pecan204
Beginner
2,692 Views

Steve,

Here is a screen shot of the message. If I select no (don't uninstall visual c ) I get a fatal error during installation.

What do you think?

Ken

0 Kudos
Steven_L_Intel1
Employee
2,692 Views
Ok, that's the old, confusing message. It is trying to tell you that since you still have the IDE integration component installed, that uninstalling the compiler (the Fortran compiler) will prevent the integration from working. I don't know why you would get a fatal error.

Try this. First uninstall the Intel Fortran Compiler Integration into Microsoft Visual Studio. Then uninstall the compiler. Now download w_fc_c_9.0.024.exe from here and install that.
0 Kudos
pecan204
Beginner
2,692 Views

Thanks, that seemed to install.

How do confirmI have the right version? If I look at "about", I see the Fortran Compiler Integration but the version says 9.0.2827.2003.

Should it say 9.0.024?

Ken

0 Kudos
Steven_L_Intel1
Employee
2,692 Views
What you are seeing is the version of the VS.NET integration, which is not the version of the compiler package. One way to see the package version is to open C:Program FilesIntelCompilerFortran9.0DocsNotesfsupport.txt
0 Kudos
Reply