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

Last reviewed: April 28, 1997
Article ID: Q96870
The information in this article applies to:

  - Microsoft Embedded SQL version 4.2 for COBOL

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


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 28, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.