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

ID: Q96870


The information in this article applies to:
  • Microsoft Embedded SQL for COBOL, version 4.2


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 "Programmer's Reference":


   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
Version : 4.2 5.0
Platform : OS/2
Issue type :


Last Reviewed: March 15, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.