Gen build LNK2019: unresolved external symbol _zzzzzzzzz referenced in function ...
search cancel

Gen build LNK2019: unresolved external symbol _zzzzzzzzz referenced in function ...

book

Article ID: 217050

calendar_today

Updated On:

Products

Gen Gen - Workstation Toolset

Issue/Introduction

The following error occurs when building a Gen 8.6 GUI C client load module which contains External Action Block (EABs)

error LNK2019: unresolved external symbol _zzzzzzzzz referenced in function _f_22020202

_fprintf and _sprintf are examples of unresolved external symbols being reported.

Environment

Gen 8.6 Build Tool

Cause

The EAB C source code contains deprecated Microsoft C functions so the LOC.EXTERNAL_LIB will need to include special libraries from Microsoft.

Resolution

In the Build Tool, for the profile being used under Profile Manager, section 'C'  add the full PATH of the library file 'legacy_stdio_definitions.lib' to LOC.EXTERNAL_LIB.
For example for Visual Studio 2019, the location is:
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\lib\x86\legacy_stdio_definitions.lib"

There may be other entries needed in LOC.EXTERNAL_LIB depending on the EAB C code.