Page 1 of 1
Compiling problems
Posted: Fri Aug 05, 2005 5:46 pm
by Leonard0
I have a 1997 Qbasic program containg 4524 lines. I tried to make EXE file using QBasic 4.5 and 7.1 but got memory overflow error. Can anybody help? . Do I need memory call ?.
I have not programmed for a while
Thanks for any help you can provide.
mem overflow
Posted: Sat Aug 06, 2005 3:25 am
by buff1
Depending on the program, you might try this (if it's one big progam as you indicated).
Set up one or more additional bas files and put some of your subs/functions in those other bas files with no main module code.
You can have declares, common, dim, etc but no executible code
in the main module (of these other bas files).
remove the subs/functions you put in the other bas files from the main program as save it.
Now, using the LOAD function in qb 4.5, load these other bas files (not open) then save the main program again.
QB will bas a MAK file containing the names of all of the bas files so that the next time you load the main program, all the others will be loaded too
You may have to tweak the program to get it to work as you want it to do
after changing the location of the subs/functions.
Now recompile. This will let the compiler compile each bas file separately
and then link them together, letting you have a large program that would
normally not compile as one bas file.
If the problem is arrays instead, then there are some swithes you can try
(see instructions). I think /AH is one but it's been a long time since i've had
to use anything like that. See also the $dynamic metastatement that might
help.
Thanks
Posted: Wed Aug 10, 2005 9:22 pm
by Leonard0
Thank you buff1.
It worked by separating into modules.
I later find a microsoft website where this issue was explained.
For anyone reference link is: support.microsoft.com/kb/q112769/
Thanks again