CA Gen 8.5 build of Windows application fails with "'cl' is not recognized as an internal or external command"

book

Article ID: 195143

calendar_today

Updated On:

Products

CA Gen

Issue/Introduction

CA Gen 8.5 with latest PTFs WKS85003 and WKS85004 installed and using Visual Studio 2012
Build of cooperative application for Windows fails and the .out file shows:

===
CA Gen Build Tool Compose
Copyright (c) 2015 CA. All rights reserved.


Compose Succeeded

Microsoft Windows [Version 10.0.18362.900]
(c) 2019 Microsoft Corporation. All rights reserved.

C:\Program Files (x86)\CA\Gen85\Gen>"C:\Program Files (x86)\Java\jre7\\bin\java.exe "   -classpath "C:\Program Files (x86)\CA\Gen85\gen\bt\bt.jar" com.ca.gen85.bt.Execute  "C:\Models\ppd_dev.ief\c\PPD01.bat"
Initial search for build executables
  NMAKE.EXE, PROC.EXE, CL.EXE, LINK.EXE, RC.EXE

--- Found NMAKE.EXE

--- Found PROC.EXE

--- Found CL.EXE

--- Found LINK.EXE

--- Found RC.EXE

 

=====================Load Module Script Environment=================
Operating System: WINDOWS
"Database Manager: ORACLE"
Environment:      IEFAE
Language:         C
Codepage:         1253
Model:            DEV PPD PRODUCT PACKAGE DISCOUNT
Subset:           ALL
Level:            9.2.A6.01

==============================SUMMARY===============================
Summary of Load Module Script Results for Load Module PPD01:
==============================LEGEND================================
Legend: ... precedes information about an operation to be performed.
        --- precedes results from an operation which just completed.
        *** precedes error info from an operation which just failed.
        (Symbols preceding info are indented to convey step levels.)

==============================DETAILS===============================
Details of PPD01 Load Module Script Results:

Microsoft (R) Program Maintenance Utility Version 11.00.50727.1
Copyright (C) Microsoft Corporation.  All rights reserved.

...Compiling PPD01 - PPD01
 cl -c -W3 -MD -D_AFXDLL -nologo -DWIN32 -D_CRT_SECURE_NO_DEPRECATE -D_DLL -Fo"C:\Models\ppd_dev.ief\c\OBJS\PPD01.OBJ" "C:\Models\ppd_dev.ief\c\PPD01.C"
'cl' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'cl' : return code '0x1'
Stop.
**************************** 
Compile step for C:\Models\ppd_dev.ief\c\PPD01.C failed with errors. 
**************************** 
File Not Found
IEFSIGNAL:FAIL
*** Build for Load Module PPD01 Failed. ***
Important!  Review above for any errors.
===

Environment

CA Gen

Resolution

The CA Gen 8.5 Build Tool (BT) script callvsvars.scr uses the appropriate installed Visual Studio (VS) environment variable (based on BT token value OPT.VSVERSION), to setup the VS environment by calling file "%VSXXXCOMNTOOLS%vsvars32.bat", where XXX represents the VS version (XXX=100 for VS2010 or XXX=110 for VS2012).

After checking the value of environment variable VS110COMNTOOLS it was found to be set to a series of ";" separated directories instead of the expected single directory value:
<VS_INSTALL_DIRECTORY>\Common7\Tools\
e.g. for default install directory:
VS110COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\

Correcting the value of VS110COMNTOOLS to point to above single directory resolved the error.

Additional Information

When using a custom install directory for the Visual Studio 2012 install, problems with the setting of VS110COMNTOOLS and other problems after running "%VS110COMNTOOLS%vsvars32.bat" have been reported. See CA Gen EDGE Community post: Build Tool Error