Agte my project (delphi 1.0 on win95) finishes compiling I get a message
"data segment too large". Does this mean I have too many constants (I have
a good amount of array of constants, is this a bad idea?)?
Any ideas?
Thanks.
Tom.
>Hi,
>Any ideas?
>Thanks.
>Tom.
You have this problem with 16-bit apps. Because of the segmented
architure of 16-bit OS, a segement has a maximum of 64K. Delphi v1
produces 16-bit applications. You OS (Win95, Win NT, or Win 3.1)
doesn't matter, because you are designing your system to run on 16-bit
machines. Also, Delphi will allow you to use only one data segment.
Constants are put into the data segment. Also simple variables will
also require more data storage. If you were to replace your array of
constants with TStringList variables, your app would compile and run.
Also, evaluate your data storage. A String variable allocates 256
bytes in Delphi v1. If the string will not contain more then 30
characters, declare it as String[30]. Also use objects and pointers
wherever you can.
Hope this helps.
Mike Sherrane
sher...@bluemtn.com blue mountain software
Our motto: "Work hard,have fun,make money."
(Delphi,Progress,C++, & Rad. Atlanta, Georgia. 770- 875-8324)
www.bluemtn.com
>Hi,
>Agte my project (delphi 1.0 on win95) finishes compiling I get a message
>"data segment too large". Does this mean I have too many constants (I have
>a good amount of array of constants, is this a bad idea?)?
>Any ideas?
Yes, too many constanrts. Thought of using .res files ?
HTH
Boris Ingram, Cyborg Software
bori...@iafrica.com
10007...@compuserve.com
http://www.pcb.co.za/users/borising/cyborg.htm
It is also a good idea to wrap all variables in a unit into one object and
store this on the heap. Then you may minimize the datasegment use of
variables and you can use it for other things.
--------------------------------------------------------------------
Alf Christophersen, Computer engineer
Nordic School of Nutrition,
PO Box 1046, Blindern, N-0316 Oslo Norway
Tel. +47 22 85 13 27, Fax: 22 85 15 32
Roo...@mail.e-world.com list owner
Editor of 'Slekt og Data', Quarterly organ of DIS-Norge,
PO Box 146, Manglerud N-0612 Oslo
URL: http://www.uio.no/~achristo
soc.genealogy.nordic, no.slekt and no.slekt.programmer proponent