Cannot find C runtime library

ERROR: (11) Cannot find C runtime library
[cobollink] Link complete with errors
[cobollink] Linking EDSUBYT.dll...
[cobollink] Micro Focus COBOL - CBLLINK utility
[cobollink] Version (C) Copyright 1984-2020 Micro Focus or one of its affiliates.
When we are trying to compile we are getting above error we don't why.
  • This error typically happens when the Microsoft linker cannot be located by the Visual COBOL build process. Visual COBOL uses components in the Microsoft Build Tools and Windows SDK for linking .dlls and .exes on Windows.  There may be a problem with the installation or location of these components on your machine.

    You can check the location that Visual COBOL is using to look for these components. 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


    This should list the Microsoft libraries that are currently in use. On my machine (running Visual COBOL for Eclipse 6.0, building for 64 bit) from the above command I see:

    Micro Focus COBOL - Configuration Utility for the Microsoft Build Tools & SDK (C) Copyright 1984-2020 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


    So on my machine, the link.exe module for example will be in a subdirectory related to the above location and version:

    c:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64\link.exe


    Once you see the output of running the command above on your machine, please check to see if the referenced directory and version are present.