Microsoft KB Archive/39250

LINK Error “Fixup Overflow” __GETBUF When COBOL Calls C

PSS ID Number: Q39250 Article last modified on 04-20-1993

3.00 3.00a | 3.00 3.00a MS-DOS | OS/2

Summary: The Link error L2002 “Fixup overflow” will occur when a Microsoft COBOL Version 3.0 or 3.0a program is LINKed to a C routine under the following conditions: 1. The C routine or function prints to the screen. 2. The C library used has GRAPHICS.LIB built in. 3. The following ADIS support files are statically LINKed to the program: ADIS.OBJ ADISINIT.OBJ ADISKEY.OBJ

More Information: The graphics support in the C library conflicts with the ADIS support files. The following are two workarounds for this problem: 1. Do not attempt any screen printing in the C routines. 2. Dynamically link the ADIS.EXE support file. To simulate the problem, link the two .OBJ files together in the following fashion: LINK callc+minitc+hello+adis+adisinit+adiskey,,,lcobol+llibce /noe; The following program is CALLC.COB: Procedure division. main-para. display “I’m in cobol”. call “C_hello”. display “we are back in cobol”. stop run. The following program is HELLO.C: void hello { printf(“hello from the C function ”); }

Additional reference words: 3.00 3.00a Copyright Microsoft Corporation 1993.