Skip to main content

cbllink fails in version 6

  • October 15, 2020
  • 1 reply
  • 0 views

I was using enterprise developer version 3 in my workstation and i use visual studio 2017 for doing compile and linking my native cobol programs.being. As part of evaluating version 6 for the use in my organization, i upgraded to version 6 but the cbllink fails through Visual studio 2019. I also tried it using command line it fails. Its not giving any relevant messages to troubleshoot. Could you please assist as soon as possible ? Following is the command being executed.


C:\\Users\\PK18963\\source\\repos\\TestAP\\TestAP>cbllink -d -v POCARCAL.dll POCARCAL.obj "C:\\SQLLIB\\lib\\Win32\\db2api.lib"
Micro Focus COBOL - CBLLINK utility
Version 6.0.0.84 (C) Copyright 1984-2020 Micro Focus or one of its affiliates.

Executing:cblnames /N /C /Ocbllds00003CCC /FM /V /S /DPOCARCAL.def POCARCAL.obj

Scanning object files:-
POCARCAL.obj
found public -> POCARCAL
found public -> _mFinfo_POCARCAL
Creating cbllds00003CCC.obj
Creating POCARCAL.def
Creating cbllds00003CCC.lnk
CBLNAMES completed

Executing:cblnames /LIST:RTS /Ocbllst00003CCC.obj POCARCAL.obj


Executing:link -subsystem:console -dll -entry:LibMain@12 -manifest -nodefaultlib @cbllds00003CCC.lnk POCARCAL.dll -out:POCARCAL.dll C:\\SQLLIB\\lib\\Win32\\db2api.lib cblrtsmi.lib oopsm.lib msvcrt.lib kernel32.lib ucrt.lib vcruntime.lib legacy_stdio_definitions.lib legacy_stdio_wide_specifiers.lib kernel32.lib user32.lib gdi32.lib advapi32.lib -def:POCARCAL.def


link finished with errors


#EnterpriseDeveloper

1 reply

Chris Glazier
Forum|alt.badge.img+2
  • Moderator
  • 3696 replies
  • October 21, 2020

I was using enterprise developer version 3 in my workstation and i use visual studio 2017 for doing compile and linking my native cobol programs.being. As part of evaluating version 6 for the use in my organization, i upgraded to version 6 but the cbllink fails through Visual studio 2019. I also tried it using command line it fails. Its not giving any relevant messages to troubleshoot. Could you please assist as soon as possible ? Following is the command being executed.


C:\\Users\\PK18963\\source\\repos\\TestAP\\TestAP>cbllink -d -v POCARCAL.dll POCARCAL.obj "C:\\SQLLIB\\lib\\Win32\\db2api.lib"
Micro Focus COBOL - CBLLINK utility
Version 6.0.0.84 (C) Copyright 1984-2020 Micro Focus or one of its affiliates.

Executing:cblnames /N /C /Ocbllds00003CCC /FM /V /S /DPOCARCAL.def POCARCAL.obj

Scanning object files:-
POCARCAL.obj
found public -> POCARCAL
found public -> _mFinfo_POCARCAL
Creating cbllds00003CCC.obj
Creating POCARCAL.def
Creating cbllds00003CCC.lnk
CBLNAMES completed

Executing:cblnames /LIST:RTS /Ocbllst00003CCC.obj POCARCAL.obj


Executing:link -subsystem:console -dll -entry:LibMain@12 -manifest -nodefaultlib @cbllds00003CCC.lnk POCARCAL.dll -out:POCARCAL.dll C:\\SQLLIB\\lib\\Win32\\db2api.lib cblrtsmi.lib oopsm.lib msvcrt.lib kernel32.lib ucrt.lib vcruntime.lib legacy_stdio_definitions.lib legacy_stdio_wide_specifiers.lib kernel32.lib user32.lib gdi32.lib advapi32.lib -def:POCARCAL.def


link finished with errors


#EnterpriseDeveloper

It looks to me like the cbllink command line is incorrect. The output filename should be preceded with the -o option.

It should look like:

cbllink -d -v -oPOCARCAL.dll POCARCAL.obj "C:\\SQLLIB\\lib\\Win32\\db2api.lib"

You copuld also pass the /Verbose option to the linker by adding in the -wl"/verbose" option on the command line.

cbllink -d -v  -wl"/verbose" -oPOCARCAL.dll POCARCAL.obj "C:\\SQLLIB\\lib\\Win32\\db2api.lib"

This should tell the link.exe to display its progress.