CompuServe Thread

Help with C overlays?

2 messages in this thread
#13365From: Greg MarquezAug 14, 1991 6:20 PM
Can anyone help me with a little problem I'm having with BLINK overlays under SAS/Lattice C 5.10a? It seems that when I have uninitialized global variables defined in a child node and then try to run my program, I get an "Unable to load <programname>: file is not an object module" error. But if I initialize the globals, the program loads and runs fine. EXAMPLE: "child.c" — (This version will get the error) int GlobalVariable; void OverlayedRoutine (void) { return; } vs. "child.c" — (This version will run just fine) int GlobalVariable = 1; void OverlayedRoutine (void) { return; } common for both test cases: "main.c" extern void OverlayedRoutine (void); void main (void) { OverlayedRoutine (); } All test routines were compiled with lc v.5.10a with no command line options ('cept the filenames). My test "BLINK WITH" file looks like this: FROM LIB:c.o FROM main.o OVERLAY child.o # LIB LIB:lc.lib LIB LIB:amiga.lib TO test I suspect that it has something to do with BSS vs DATA? Any help would be greatly appreciated! Greg Marquez (ps anyone have SAS's support number? Did they drop the 900 number?)
#13564From: Bob WarrenAug 19, 1991 8:25 PM
SAS's phone number is 919-677-8166. I believe they dropped the 900 number. I'm planning to use overlays as well, so let me know what you find out! – Bob Warren