Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Out of string space if compiled on my box

Status
Not open for further replies.

WindFox

Programmer
Aug 18, 2005
2
US
I've got this program that I compile in BC7 that generates an out of string space error at execution. If i hand the same code to a friend that compiles it on his machine, and run the program on my PC, it works fine.

The only difference I see is that I have XP and he has 98. However, if I compile on a third box (DOS 6, Target PC that runs the exe.), it generates the same error.

Why is this happening? I need to be able to build from my PC.
 
First look at line lengths. Try to keep line lengths less
that 100 characters if at all possible.

Usually, this is caused either by large string arrays or
just a program that's too large.

If it is the arrays, it may be harder to overcome.

Programs, however, in QB, can be cut into several bas files.

A main module with module level code and other bas files
with just subs and functions and no main module code.

If you split it up this way (putting subs and functions in
other bas files), you can open the main file then "load"
the other bas files. QB will create a "MAK" file so that
the next time you open the main module, all the bas files
will be loaded also.

This way, when you compile it, each bas file is compiled individually then linked together allowing large programs to be created.
 
OK, the program already is split into 15 different BAS files years ago (and it's giving me problems now, go fig).

However, I have two larger programs that don't give me any problems at all.

Also, these programs are WAAAY to big for the QBX IDE (I've tried, many times).

I use a dos batch file for compiling (using BC switches /MBF/S/FS/E/G2 for all of them) and linking.

But the thing that annoys the hell out of me is that I can copy my entire BC7 folder (with my source) to the Win98 PC to compile, and it works just fine on the DOS box (which is actually DOS 5 after checking)
 
try to check how much DOS memory have each of the boxes
(MEM command at DOS prompt)?
I recall then I had DOS box I had things tuned to get maximum DOS memory... while now under XP I just don't care
 
well looks like you've done about all you can do. I would say that you should probably stay with win98 for compiling purposes then.

By the way. You mentioned using a bat file to compile your program.

I've got a compiler aid on my site. It was designed to be able to compile a large number of programs at one sitting.

There are 2 programs actually one that makes a bat file that can be used for all kinds of things and another that does compiling. See what you think.


on the files page
execbat and tcompile
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top