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

fatal error LNK1811: cannont open input file 'libifcoremt.lib'

postaquestion
Novice
1,574 Views

I have a brand new Dell computer with Windows XP. I complete-installed Microsoft Visual Studio 2005, MSDN, and then Intel Visual Fortran 9.1 compiler. I opened a project from Visual Studio .NET. Upon building I receive an error:

fatal error LNK1811: cannont open input file 'libifcoremt.lib'

What do I do? This is the same problem I had with both Visual Studio .NET and v2005 on my previous Win2000 computer. The odd thing is that three other people are using the exact same project/code in WinXP and Win2000 with Visual Studio .NET and have no problem building and running.

It appears that Visual Studio is including its own files and project specific files, but not Intel-related files, although the directories are specified in the path configurations.

0 Kudos
7 Replies
Steven_L_Intel1
Employee
1,574 Views
My guess is that when you installed, you select to install for you only and not for all users. There seems to be an odd thing about VS that makes the Fortran integration not work unless you say "all users". Try uninstalling the Fortran integration and then reinstalling saying "All Users". Current kits tell you this when you install.
0 Kudos
tv3
Beginner
1,574 Views
I chose "All users," so it must be something else. Any other ideas?
0 Kudos
Steven_L_Intel1
Employee
1,574 Views
What folders are listed under Tools..Options..Intel Fortran..Directories..Library Files?

Oh - is this a mixed-language project with a C main program or the C project does the linking? If so, you need to add the Fortran LIB folder to Tools..Options..Projects..VC++ Directories..Library Files.
0 Kudos
tv3
Beginner
1,574 Views

$(FORTInstallDir)Lib
$(VCInstallDir)lib
$(VCInstallDir)atlmfclib
$(VCInstallDir)atlmfclibi386
$(VCInstallDir)PlatformSDKlib
$(FrameworkSDKDir)lib
$(VSInstallDir)
$(VSInstallDir)lib
C:Program FilesMicrosoft Visual Studio 8VCATLMFCLIB
C:Program FilesMicrosoft Visual Studio 8VCLIB
C:Program FilesMicrosoft Visual Studio 8VCPlatformSDKlib
C:Program FilesMicrosoft Visual Studio 8SDKv2.0lib
%IFORT_COMPILER91%IA32Lib
%IFORT_COMPILER91%EM64TLib

I inserted the line
c:Program FilesIntelCompilerFortran9.1IA32Lib
just below the $(IFORTInstallDir)Libline to see if a more explicit path statement would help. It didn't.

The total program is a C++ user interface which calls a Fortran program to run a farm simulation. The Fortran program, itself, compiles fine. It was imported according to Visual Studio requirements when we moved up to .Net and the whole thing works just fine on several other computers (both Win 2000 and XP). The C++ section itself also builds just fine except for locating the Fortran Libraries.

0 Kudos
Steven_L_Intel1
Employee
1,574 Views
You have to add:

C:Program FilesIntelCompilerFortran9.1IA32Lib

to the C++ Projects..VC++ Directories..Library Files list.
0 Kudos
tv3
Beginner
1,574 Views

Thanks Steve. If you were nearby I would bake you some chocolate chip cookies! :)

I have the program compiling now. Running the .exe is causing an assertion error, but that I am sure is a totally different issue. For the sake of other readers here is what I did to fix the "LNK1811" and related issues.

Tool/Options/Projects and Solutions/VC++ Directories

Top left pull-down menu is set to "Platform: Win32"

Top right pull-down menu (Show directories for:)

SELECT from pull-down menu

ADD to the list in dialog window **

Executable files

C:Program FilesIntelCompilerFortran9.1IA32Bin

Include files

C:Program FilesIntelCompilerFortran9.1IA32Include

Library files

C:Program FilesIntelCompilerFortran9.1IA32Lib

**the paths should be whatever YOUR computer path names are.

Tool/Options/Intel Fortran/General

SELECT button from the following textboxes

ADD to the list in dialog window **

Executables:

C:Program FilesIntelCompilerFortran9.1IA32Bin

Libraries:

C:Program FilesIntelCompilerFortran9.1IA32Lib

Includes:

C:Program FilesIntelCompilerFortran9.1IA32Include

**the paths should be whatever YOUR computer path names are.

Changes to YOUR specific project settings:

Select YOUR C++ project; right-click and open the properties dialog box.

Under Configuration Prope rties/Linker/Input

ADD to Additional dependencies the complete path of your Fortran project lib. (I think it helps to have no spaces in the path; if you do have spaces, maybe you can put the whole thing in quotes I dont know.) For example, I have a C++ project called IFSM and within it is a Fortran project which builds first to be called IFSM_lib. So my new additional dependencies line has three libraries listed, and looks like:
libifcoremt.lib ifqw_sdi.lib c:IFSMIFSMDebugIFSM_lib.lib

that's all. Thanks again for your quick help! -- Tamie

0 Kudos
Steven_L_Intel1
Employee
1,574 Views
You're welcome. I'm hopeful that the upcoming VS2005 SP1 will eliminate the need for the last part.
0 Kudos
Reply