Microsoft KB Archive/96870

= PRB: ESQL: Errors When Linking COBOL Applications for MS-DOS =

PSS ID Number: 96870

Article Last Modified on 10/3/2003

-

The information in this article applies to:


 * Microsoft Embedded SQL for COBOL 4.2

-



This article was previously published under Q96870



SYMPTOMS
You can use Micro Focus COBOL 3.0 or Microsoft COBOL 5.0 to compile and link MS-DOS applications with Microsoft Embedded SQL for COBOL Programmer's Toolkit (ESQL/COBOL). However, you may run into some linking errors using these versions of COBOL compilers.

When linking MS-DOS applications using ESQL/COBOL 4.2, you will normally use the following link command line as documented in the ESQL/COBOL 4.2 &quot;Programmer's Reference&quot;:

link yourprog.obj+sqlinim+MFC6INTF+C6DOSIF+C6DOSLB,,, lcobol+cobapi+llibcer+sqlakd+rldblib /NOE /NOD /NOF /NOP;

This works correctly under earlier versions of the COBOL compilers such as Micro Focus COBOL 2.5 or Microsoft COBOL 4.5. However, with the new Micro Focus COBOL 3.0 or Microsoft COBOL 5.0, you will get the following link errors:

rldblib.lib(..\..\src\dbmidio.c): error L2025: DOSSLEEP:

symbol defined more than once

rldblib.lib(..\..\src\dbmidio.c): warning L4004: possible

fixup overflow at 24D in segment _DBMDIO

target external 'DOSSLEEP'

rldblib.lib(..\..\src\dbmidio.c): error L2002: fixup

overflow at 24D in segment _DBMIDIO

target external 'DOSSLEEP'



CAUSE
Due to changes in the new COBOL compiler libraries, the original link line for linking MS-DOS applications as documented does not work correctly.



WORKAROUND
To work around this problem, you can re-arrange the link line as follows:

link yourprog.obj+sqlinim+MFC6INTF+C6DOSIF+C6DOSLB,,, lcobol+llibcer+rldblib+sqlakd+cobapi /NOE /NOD /NOF /NOP;

Please note that the order of the library files is changed.

Additional query words: PTK MSDOS

Keywords: kb3rdparty KB96870

Technology: kbAudDeveloper kbSQLEmCOBOL kbSQLServSearch kbZNotKeyword3

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.