[comp.lang.c] MSC 5.0 CONST Segment > 64k. Is it possible?

norm@cfctech.UUCP (Norm Meluch) (08/31/89)

I am posting this here because maybe there is some bit of info all of us
DOS hack hackers are missing.  A few problems have been experienced by myself
and others have trying to compile nethack 3.0 on a PC using MSC 5.0.
Here is one article describing the problem.  Please reply to me, John,
or the net with any solutions.

NOTE: This is a cross post of John's original article without his permission.
      I hope you don't mind John.  If you do, feel free to flame me at the
      above address.

}* Subject: Nethack 3 MSC 5.0 DOS 3.2, CL & LINK Help!!
}* 
}* I have been having trouble linking nethack 3.0 on my pc.  I have 
}* MSC 5.0, DOS 3.2.
}* 
}* I couldn't use the make file with the MAKE program that comes with the 
}* Microsoft C 5.0 compiler, so I compile the program buy hand with a .bat
}* file.  
}* 
}* I did the makedefs.
}* 
}* I compiled the rest of the programs.
}* 
}* I couldn't compile ioctl.c because it was looking for a
}* header file that wasn't there.  
}* 
}* The problem I wan't answered now is on linking.  
}* I linked with a link file that looked like this:
}* obj files +
}* obj files +
}* obj files +
}* ... +
}* ... +
}* /EXE /NOIG /STACK:0X0AFF /SEG:512
}* NETHACK
}* NETHACK
}* LLIBCE
}* 
}* I got the error:
}* SHK.OBJ(shk.c) : fatal error L1070: CONST : segment size exceeds 64K
}*  pos: 96 Record type: 98
}* 
}* I move the line with "SHK +" to the top and linked and got the same error on
}* the file that followed SHK's original position.  So the error is not with 
}* the file, but with the size.  The error L1070 says to compile and link with 
}* a large memory model.  I think I am.  I use this line when compiling each 
}* modual.
}* 
}* CL /c /Al /DLINT_ARGS /Ot /Oa /Gs /Gt28 /I..\include file.c
}* 
}* 
}* I didn't read anything about memory models in the linker manual.
}* 
}* If you have any suggestions to help me, could you email them to me.
}* 
}* I was reading the net and saw a make program called NDMake.  Could some one
}* send it to me, or tell me how to get it.
}* 
}* Does anyone have a PATCH program for SUN or IBM PC. Could you send me a copy.
}* 
}* Thanks.   PS: I got it running on the SUN but all the data files can't 
}* be opened.  So I can't get help with the ? comand, or identify items with
}* /.) He look a new smiley.
}* 
}* -- 
}* John W. Hamill, EDS `""""""" UUCP: ...!uunet!edsews!edstip!alf 
}* 1400 N. Woodward Ave (. (. >       alf@edstip.EDS.COM          
}* Bloomfield Hills,           Voice:(313)645-4524  Fax:645-4824
}* MI 48013  * The above are my views only!!             


|~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Norman J. Meluch ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
| Mail:{sharkey|mailrus}!cfctech!norm  Fax:(313)948-4975  Voice:(313)948-4809 |
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
| Note: The opinions expressed here are in no way to be confused with valid   |
|_______ideas or corporate policy.____________________________________________|

markro@microsoft.UUCP (Mark Roberts) (09/06/89)

In article <14386@cfctech.UUCP> norm@cfctech.UUCP (Norm Meluch) writes:
>}* SHK.OBJ(shk.c) : fatal error L1070: CONST : segment size exceeds 64K

This is a known problem with C5.0; it ignores the data threshold (-Gt28)
for items in the CONST segment.

The problem is corrected in version C5.1.