CompuServe Thread

Help with C overlays?

2 messages in this thread
#13430From: Greg MarquezAug 16, 1991 10:33 PM
(posted before, but I'll try developers 😉 ) 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?)
#13503From: Steve AhlstromAug 18, 1991 8:04 PM
Richard, SAS's main number is 919-677-8000. They never instituted the 900 service. -sja