- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I just installed the compiler version 10.1 and Microsoft Visual Studio 2008. I'm not a familiar user of fortran compilers - i just need to compile a simplecalculation programme. WhatI get whenI try to assemble my source files is the following error message:
fatal error LNK1104: cannot open file 'kernel32.lib'
I assume this is rather an installation problem than a problem with my source files. Do you know whether something went wrong with either the compiler or visual studio during installation? DoI need to reinstall something or define certain linking for the compiler to find the kernel-file?
thanks a lot for a short answer,
carmen
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yes, indeed. We installed first Microsoft Visual Studio with C++ component, then we downloaded the compiler version 10.1.
I am using the Visual Studio interface to compile, not the prompt command.
I will not be able to actually do anything - I am not administrator of my computer, maybe this causes problems? I pretty much trust our IT support that my computer really has a 32bit processor.
Do you reckon a solution would be to uninstall both programmes, then download the compiler "for users who do not have Visual Studio" and re-install everything? Or is it a far more serious problem?
Thanks,
Carmen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Now in Visual Studio, select Tools > Options > Intel Fortran > Compilers. Click the ... button next to Libraries and see if it includes this line:
$(WindowsSdkDir)lib
If it does not, add it, click OK and then try a rebuild and see if that helps.
If not, select Tools > Visual Studio 2008 Command Prompt (Oddly, in my VS2008, this reads "Visual Studio 2005 Command Prompt". In the window that opens, type:
set windowssdkdir
Copy and paste the full contents of this window into a reply here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Steve,
first check:if I go to C:Program FilesMicrosoft SDKsWindowsv6.0A - v6.0A includes only two folders: "bin" and "Bootstrapper" BUT: If I go to C:Program FilesMicrosoft SDKsWindowsv5.0, there is a folder "lib" with a subfolder "IA64"which includes kernel32.lib (C:Program FilesMicrosoft SDKsWindowsv5.0LibIA64)
second check: yes, it includes the line "$(WindowsSdkDir)lib"
regards,
Carmen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The proper SDK is not installed. The 5.0 folder you have is for Itanium-based systems only and is old.
I can't figure out how the SDK did not get installed, since it does not seem to me that it is a choice offered by the VS2008 install - you always get it.
You could ask your system admins to install the Windows SDK for Windows Server 2008 , which is the latest.
Would you please do the "Visual Studio Command Prompt" test I requested above?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve,
here you go - sorry that I didn't do it before; the command prompt windows says:
Setting environment for using Microsoft Visual Studio 2008 x86 tools.
C:Program FilesMicrosoft Visual Studio 9.0VC>set windowssdkdir
WindowsSdkDir=C:Program FilesMicrosoft SDKsv6.0A
C:Program FilesMicrosoft Visual Studio 9.0VC>
No idea why I have kernel32.lib in the folder v5.0; all links and everything reference to v6.0a - also if I go to the Startmenu>Programs>Microsoft Windows Sdk V6.0a. I'll ask system admin to install 2008.
Carmen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yep, that was it. they re-installed visual studio 2008 (no idea what went wrong in the previous installation)and now the compiler finds kernel32.lib. no need to do anything with windows sdk or the compiler...
thanks, steve!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I ran into a similar problem listed here. I was using intel visual fortran 10.1 and microsoft visual studio 2008 to compile Abaqus User subroutine. they worked successfully previously, but later, I got a error message: WindowsSdkDir not found.
I reinstalled the microsoft visual studio 2008 sp1 and this time installwindows SDK 1.1, but it doesn't work anyway.
Then i found out some suggestion provided in this thread. According to the suggestion:
-------------------------------------------------------------------------------------
Now in Visual Studio, select Tools > Options > Intel Fortran > Compilers. Click the ... button next to Libraries and see if it includes this line:
$(WindowsSdkDir)lib
If it does not, add it, click OK and then try a rebuild and see if that helps.
If not, select Tools > Visual Studio 2008 Command Prompt (Oddly, in my VS2008, this reads "Visual Studio 2005 Command Prompt". In the window that opens, type:
set windowssdkdir
----------------------------------------------------------------------------------------------------------------
Tools > Options > Intel Fortran > Compilers. Click the ... button next to Libraries
I got the following information:
for platform X64, the content is as follows:
$(IFortInstallDir)Lib
$(VCInstallDir)atlmfc\lib\amd64
$(VCInstallDir)lib\amd64
$(WindowsSdkDir)lib\x64
For platform win32, the content is as follows:
$(IFortInstallDir)Lib
$(VCInstallDir)atlmfc\lib
$(VCInstallDir)lib
$(WindowsSdkDir)lib
The platform of my computer is x64.
For the second suggestion, I didn't find visual studio 2008 command prompt underneath Tools, so i went to Start > all programs > microsoft visual studio 2008 > visual studio tools > Visual studio 2008 Command Prompt and type Set WindowsSdkDir
the following content was shown:
WindowsSdkDir=C:\Program Files (x86)\microsoft visual studio 9.0\VC\PlatformSDK\
However, i could not findfolder PlatformSDK underneath folder VC.
then i went tochecked the registry,I got the following information:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows]
"CurrentVersion"="v6.0A"
"CurrentInstallFolder"="C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\"
[HKEY_CURRENT_USER\Software\Microsoft\Microsoft SDKs\Windows\v6.0A]
"InstallationFolder"="C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\"
In the C:\Program Files\Microsoft SDKs\Windows\v6.0A folder, it has four folders, which are bin, lib, FXCop, and include.
and i also saw the following information in the registry.
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A]
"InstallationFolder"="C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\"
"ProductVersion"="7.0.30319"
"ProductName"="Microsoft Windows SDK for Visual Studio 2010"
However, underneath C:\Program Files (x86)\Microsoft SDKs\Windows, i only saw two folders, which are v5.0 and v6.0A, nofolder v7.0A. inside folder v5.0, i only saw two folders, which are include, and lib. inside folder v6.0A, i only saw folder bin and Bootstrapper.
Could you please tell me how to solve this problem? Thank you so much in advance.
Best Regards,
Jingfen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
At best, when using an ifort which was issued prior to the release of your Visual Studio, you might be able to run on command line by setting the /Qlocation,link option. This may work, assuming your Abaqus build is a command line script. Microsoft doesn't make new Visual Studio releases compatible with older ones.
If you are using an old version of Abaqus which was tested only against the old ifort, there is a good possibility it will work with a newer ifort. Attempting to link in a newer Visual Studio than the one they tested is probably more risky than a newer ifort. If you are paying for Abaqus support, you can ask them for advice; if not, this forum can't act as an adequate substitute.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
fortran compilers - i just need to compile a simplecalculation programme. WhatI get whenI try to
assemble my source files is the following error message:
fatal error LNK1104: cannot open file 'kernel32.lib'...
Could you specify whatedition of Visual Studio 2008you have? Is it aProfessional, Standard, or Express?
The library 'kernel32.lib':
- is included with aProfessional edition of VS 2008
- is not included with anExpress edition of VS 2008( in that case a Platform SDK, any version, has to be installed )
- I don't have data for aStandard edition of VS 2008
Best regards,
Sergey

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