Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QuickBasic 7.1 Won't Make EXE
#1
Hi, I have making a game and his source bas file size is only 40KB and it works with no problems in QuickBasic itself but when trying to make an EXE file of it, it's Sounds A Beep
and Writes the following Error:

Bc Out Memory

45880 Bytes Available
2 Bytes Free

0 Warning Errors(s)
1 Sereve Error(s)

Even In QuickBasic 4.5 it does the same.

What should I do?
Reply
#2
Uhm What's your OS? Try quiting a few running programs and run in fullscreen.
[Image: sig.php]
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Reply
#3
First of all, I'm using MS-DOS 6.22
and Second, I have Enough Memory (Like 46MB Free Ram)

So any other Suggestions?
Reply
#4
Note: Free memory is not free RAM, free memory is free conventional memory. (Which is limited to 640KB, so max would be that, not that you can possibly get max, but anyways)

When you try to compile, the QB IDE calls BC and then LINK

Those programs have to fit in memory (each at a time) alongside your code, and QB.


And as you can see, when BC starts it tells you taht you have:
45880 Bytes Available

That is the free amount of mem you have, BEFORE BC starts to compile your BAS.

If your BAS is ~40KB (For ease, let's assume: 40kb=40000bytes)
Then you're left with 5000bytes, for BC to keep variables and all other stuff neded in compile time.

Not enough in other words.

Try compiling from the commandline, or free some memory, check your CONFIG.SYS, and AUTOEXEC.BAT and don't load any un-needed stuff.
Reply
#5
I'm uneducated when it comes to this - but couldn't you try right-clicking on BC.EXE, going into Properties, then the Memory tab, and increasing the Conventional Mem property by, say, 40 KB?
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Reply
#6
I think the easiest way is to hit Ctrl-Alt-Del and end everything except explorer and systray.
Reply
#7
He IS in DOS!!!
There is no systray or explorer...keep in mind!!!
B 4 EVER
Reply
#8
Correction to my previous post, BC is limited to 64KB memory, at a time, not 640KB which is the computer hardware limit for conventional memory.

Try dividing your code into modules, if you don't want to compile from the command line that is.

Commandline works when the IDE fails =)
Reply
#9
I have found the Solution Big Grin !!!

Thanks for the idea Z!re about Modules it can help me if my game will be extremly large... but the real problem
was ONLY in TWO SIMPLE lines which are:

part of the game in SUB

NewObject.X = X * TILEW
NewObject.Y = Y * TILEH


The Two Problematic lines in the same SUB :

NewObject.Dx = NewObject.X + INT(RND * 21) - 10
NewObject.Dy = NewObject.Y + INT(RND * 21) - 10

I changed it into:

NewObject.Dx = X * TILEW + INT(RND * 21) - 10
NewObject.Dy = Y * TILEW + INT(RND * 21) - 10

And suddenly I could actually Complie the program with ease
and seen that I have really enough memory for the source ( something like 31000 Bytes)

still can't understand why this two lines caused to lower memory
to something like 2 Bytes Free?
That is really wired :???:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)