Hi,
Im encountering error during the build of my Visual Cobol Project.
[cobollink] Linking (64-bit) Sample_Windows_0314.exe...
[cobollink] Micro Focus COBOL - CBLLINK utility
[cobollink] Version 7.0.0.87 (C) Copyright 1984-2021 Micro Focus or one of its affiliates.
[cobollink]
[cobollink] Microsoft (R) Incremental Linker Version 14.16.27045.0
[cobollink] Copyright (C) Microsoft Corporation. All rights reserved.
[cobollink]
[cobollink] Program1.obj
[cobollink] cbllds00001520.obj
[cobollink] LINK : fatal error LNK1181: cannot open input file 'kernel32.lib'
[cobollink] Link complete with errors
[cobollink]
#VisualCOBOLEclipseHello John patrick Mercado,
Welcome to the Micro Focus Community Site. I believe the file mentioned in the error message:
[cobollink] LINK : fatal error LNK1181: cannot open input file 'kernel32.lib'
is part of the Windows SDK provided by Microsoft.
As a first step, I suggest you try doing a Repair on the Visual COBOL for Eclipse install. Then try your build again.
If that does not resolve the issue, you can use the cblms command with the /Q option to determine where the Visual COBOL product will look for the SDK. Open up a Visual COBOL 32 bit (or 64-bit, depending on your target bitism) command prompt from the Start Menu, and issue the following command: cblms /Q
Here is an example from my system:
C:\\>cblms /Q
Micro Focus COBOL - Configuration Utility for the Microsoft Build Tools & SDK
7.0.0.89 (C) Copyright 1984-2021 Micro Focus or one of its affiliates.
Windows SDK
location = c:\\Program Files (x86)\\Windows Kits\\10
version = 10.0.17763.0
Microsoft Build Tools
location = c:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools
version = 14.16.27023
You might want to check to confirm that the directories shown in your output from the "cblms -q" command exist on your machine.
Then, you might want to check to confirm whether the kernel32.lib file exists under that location. One way to do this is using the Windows "where" command. For example (be sure to substitute the SDK directory you see in your output from the cblms command):
C:\\>where /F /R "c:\\Program Files (x86)\\Windows Kits\\10" kernel32.lib
.
.
"c:\\Program Files (x86)\\Windows Kits\\10\\Lib\\10.0.19041.0\\um\\x64\\kernel32.Lib"
"c:\\Program Files (x86)\\Windows Kits\\10\\Lib\\10.0.19041.0\\um\\x86\\kernel32.Lib"
.
.
Please let us know how it goes.