Subj : Re: Error: Too much global data defined in file To : borland.public.cpp.borlandcpp From : Morosh Date : Sun Feb 20 2005 01:26 pm Hi: I tried to add "far" or "_far" to the biggest arrays, the result is exactly the same, (the error is on the same line), my command is : bcc -4 -ff -N -ml file.cpp I counted the space required for my global data, it's 13934 bytes only!!! Curious NO? Any other idea? (I can send you all my files but do you have time for that?) thanks Morosh Ed Mulroy [TeamB] wrote in message news:4217535a$1@newsgroups.borland.com... > Global and static data go into a combined segment called DGROUP. The > machine hardware limits a segment to 64K. > > If you add the keyword 'far' to a global or static data items, the > compiler will flag it to be placed into a different segment and not in > DGROUP. Try locating a few of the largest global data items and > adding that keyword to them. > > For example: > > char far big_array[2048]; > > The language standards committee dictated that compiler-specific > keywords begin with an underscore. It has been a while since I did > this with BC++ 5.02 and I don't remember how strictly this is > enforced. If it gives trouble with 'far', then use '_far'. > > Please let us know how this works for you. > > . Ed > > > Morosh wrote in message > > news:42173118@newsgroups.borland.com... > > > > I made a C++ program for accountancy purposes, it's DOS style, I > > compile using bcc.exe of Borland C++ v5.2. I choose the "large > > model". Now I have this new error "Error: Too much global data > > defined in file" saying that I have a lot of global variables. I > > counted > > the space required for my global data, it didn't exceed 64k. > > my command line is: > > > > > bcc -4 -ff -N -ml e:\my_data\prog\tc\%1.cpp > compc.rpt > > > > > In the same time, I have a lot of message'strings, but with the > > large > > model there is 1MB of data space. > > > > Is there any solution for that? > > .