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

link error

uhahaha
Beginner
502 Views
Hi:

I am brand new to Visual Fortran and tried to test VF Composer XE. But I am getting the link error:

Error 1 fatal error LNK1104: cannot open file 'kernel32.lib'

The code is just a plain simple 'hello world' one. My dev environ is Win7 x64, VS 2010.

Thank you. I would appreciate any help.

0 Kudos
9 Replies
Steven_L_Intel1
Employee
502 Views
This means that either the Platform SDK part of Visual Studio did not install or the VS environment doesn't see it. In VS, go to Tools > Options > Intel Visual Fortran > Compilers. Click on the ... button to the right of Libraries. Copy the contents and paste it into a reply here.

When you installed VS2010, did you accept the default configuration or did you customize it?
0 Kudos
uhahaha
Beginner
502 Views

Hi:

I think I left out VB.NET, J#.NET when I installed VS2010. Otherwise, I installed with the default config. I have no trouble compiling C++ andC#. The Fortran libraries are:

$(IFortInstallDir)compiler\lib\ia32

$(IFortInstallDir)mkl\lib\ia32

$(VCInstallDir)atlmfc\lib

$(VCInstallDir)lib

$(WindowsSdkDir)lib

$(FrameworkSDKDir)\lib

Thanks.

0 Kudos
Steven_L_Intel1
Employee
502 Views
Ok, that should be good so far. Now, do you have a folder C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib ? (that 6.0A may be something different in VS2010 - don't have that on this system yet.)
0 Kudos
uhahaha
Beginner
502 Views
Hi:

I have v6.0A folder, but only Bootstrapper subfolder. No Lib folder.
I also have v7.0A folder & do have Lib subfolder. I have the folder tree:

v7.0A
|
Lib
|__IA64
| |__AclUI.Lib,... , Kernel32.Lib, ... , xpsprint.lib
|
|__x64
| |__AclUI.Lib, ... , Kernel32.Lib, ... , xpsprint.lib
|
|______AclUI.Lib, ... , Kernel32.Lib, ... , xpsprint.lib

Thank you.
0 Kudos
TimP
Honored Contributor III
502 Views
VS2010, with the necessary C++ compiler installation, puts many libraries in SDK \V6.0A\Lib\

IA64 folders would work only for cross compiling to Itanium, for which no XE compiler is provided.
0 Kudos
Steven_L_Intel1
Employee
502 Views
I agree with Tim - looks like you do not have the IA-32 or x64 set of V6.0A libraries installed from VS2010. Rerun the VS2010 setup, select Add or Remove Features, and make sure that all of the Visual C++ components are selected.
0 Kudos
uhahaha
Beginner
502 Views


As the above install screen shows I installed everything for Visual c++ part, but that didn't create Lib subfolder in V6.0A folder.
After googling I found that V6.0A is installed by VS2008, but VS2010 installs V7.0A.
As I said earlier V7.0A folder has the needed libraries. Why not the VF make use of it? Is there anyone who successfully compiled VF with VS2010 on Win7 x64?
0 Kudos
Steven_L_Intel1
Employee
502 Views
I build with VS2010 on x64 all the time. I admit this is confusing, but from what I can tell Visual Studio looks to the value of the registry entry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\CurrentVersion (or possibly ProductVersion) to determine which SDK to use. On both my systems with VS2010 installed, this points to V6.0A even though V7.0A is also there. From the command line, though, it uses VS7.0A (this was probably set when VS2010 was installed.) It may depend on the order of installation of VS.

You can try changing those registry values to V7.0A and see if it works for you.
0 Kudos
uhahaha
Beginner
502 Views
Changingregistry value of CurrentVersionfrom V6.0A to 7.0A didn't help even after restarding the computer. So I eneded up deleting the v6.0A folder and reinstalled V2010 & Vis Fortran. Hurrah! this time it worked!

* I checked that no v6.0A folder was created by VS2010 and registry value of CurrentVersionis V7.0A.

Thank you Steve, your suggestion really helped me out.
0 Kudos
Reply