Qbasicnews.com

Full Version: Having problems with Overlay Linker.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Never thought this will happen. 100 times comiled and re-compiled
varous source codes and only problems I had were with related to
BC.EXE compiler in the area of free memory.

Anyway, I just recoded great deal of my latest project, LONG. Removed
large amount of data into outside files and added proper code that
manages that data. When the conversion was done, I tested the demo
and it worked fine. Compiled the code and no problems happened
which was my goal when I started to recode the game.
I had 15724 bytes of free memory left after the compiling.
Source code is 85KB size, BTW.

Now, when I tried to use Overlay Linker(LINK.EXE) unexpected
problems occured.

I got this message :

LINK : error L2041: stack plus data exceed 64K

after that bunch of error message going through ALL library
routines(I guess) like :

NEWREL.LIB(keyboard.ASM) : error L2002 : fixup overflow at 0002 in segment...


I don't have to point out that latest version of LONG code is very
economic. I mean you see that from the little amount of memory
consumed during compilation.

What I want to know is what might be causing this problem? I completely
confused since with much larger and complex source codes I had
no such problems.

I have a strange feeling I'll have to give the source code to Eric for
some technical overhauling. Tongue
Thats funny. I think I get the same error when I compile a prog with Rellib. But i am not sure. I will confirm it later =P
Hi Lachie.

What version of the compiler are you using, and could you give the exact BC.EXE & LINK.EXE line you're using?

- Dav
REM $dynamic

Try Redim instead of DIM.
Dav, have no idea. Will check it back home.

Rel, hmm...I'll send you the code if you don't mind. I just don't understand why LINK is giving me problems if BC is not.

Also, if I use REM $dynamic no way I'll be able to compile my programm with BC.EXE .

But I think this might be it...you tell me.

I'm using this kind of array [ CBox(40) as BoxType ] to store all
my click boxes loaded from outside files.

BoxType is concisted of several variables including two STRING
variables declared with
Text 1 AS STRING * 756
Text 2 AS STRING * 756

Now, I'm not sure about 756 but it's a number around that value. What I want to know is why that number has to be there and can it be different? What that number behind the STRING declaration means? I saw it in other programms and just used it on the same way in my programms.
I can decrase the maximum number of CBox-es since so far
no scenes need 40 click boxes but I would like to solve this problem
more neatly. If the STRINGS are the problem in the first place. But don't see how because I can run the source code in QB IDE just fine.

Why LINK won't turn the OBJ file in an EXE file? :evil:
DATA segment is limited to 64k, you are way over that. ;*)
Well, tell me what I need to do!

I'm a dummy programmer.

Sad
Quote:DATA segment is limited to 64k, you are way over that. ;*)

If thats the case then the only solution is either using EMS/XMSyou or reducing the amount of data stored in conv. mem =P.
You didn't said to me what that number behind STRING declaration means and can I decrase it.

Are you telling me that I can't store up to 40 lines(textual
sentences) in the CBox variable at once, meaning in the conventional memory?

HELP!
Text 1 AS STRING * 756
Text 2 AS STRING * 756

The 756 means you are defining a string in which you can store upto 756 characters. So if you make a type with only those two variables and then DIM an array having 40 elements in it. Then it means you are effectively allocating 756 * 2 * 40 bytes. That is 59Kb of memory goes only to those two elements. So basically you are eating up too much memory. So what I suggest is get some proggie which you can use to store strings in EMS/XMS memory.
Pages: 1 2