Problem with linking a QuickBASIC program (urgent!!!!!) 
Author Message
 Problem with linking a QuickBASIC program (urgent!!!!!)

HELP!!! HELP!!!

Can anybody help us with a terrible problem in QuickBASIC?!

We've written an application but we can't link it. During the
progress of linking the linker suddenly stops and the following
error message occurs:
fatal error: size of segment exceeds 64K

We don't know how to solve the problem. Can anybody give
us a hint?

Thank your for your help.

Rolf Loewisch and Florian Lorenzen



Thu, 11 Nov 1999 03:00:00 GMT  
 Problem with linking a QuickBASIC program (urgent!!!!!)



Quote:
> HELP!!! HELP!!!

> Can anybody help us with a terrible problem in QuickBASIC?!

> We've written an application but we can't link it. During the
> progress of linking the linker suddenly stops and the following
> error message occurs:
> fatal error: size of segment exceeds 64K

> We don't know how to solve the problem. Can anybody give
> us a hint?

> Thank your for your help.

> Rolf Loewisch and Florian Lorenzen

It could be that your basic source is too long...
Try to split up your programm into some a sub-programms (edit, new sub)  so
that your "main" source file gets some smaller, then test your programm and
compile it egain....


Thu, 11 Nov 1999 03:00:00 GMT  
 Problem with linking a QuickBASIC program (urgent!!!!!)


Quote:
>HELP!!! HELP!!!

>Can anybody help us with a terrible problem in QuickBASIC?!

>We've written an application but we can't link it. During the
>progress of linking the linker suddenly stops and the following
>error message occurs:
>fatal error: size of segment exceeds 64K

>We don't know how to solve the problem. Can anybody give
>us a hint?

Hi Rolf,

  These computers, for all their power, can still only access 64k at a time,
this is a SEGMENT. Your code, obviously, is attempting to create more than 64k
of code in one SEGMENT.

  Somewhere (half way) in your code put a $SEGMENT metastatement. This will
tell the compiler to close-off the first segment and start on a new one.

C'ya,

  ____    _    ____      ____  _____
 |  _ \  / \  / ___) __ | ___)(_   _)
 | |_)  / _ \ \____\/  \|  _)   | |
 |____//_/ \_\(____/\__/|_|     |_|

     www.basicguru.com/schullian



Fri, 12 Nov 1999 03:00:00 GMT  
 Problem with linking a QuickBASIC program (urgent!!!!!)


Quote:

>Can anybody help us with a terrible problem in QuickBASIC?!
>We've written an application but we can't link it. During the
>progress of linking the linker suddenly stops and the following
>error message occurs:
>fatal error: size of segment exceeds 64K

Sounds as if you've got all your code in a single file ?

The maximum size for a code file or "module" is 64k, you'll
have to break it up into several files and then use the
Load File option to load in all the files.

Any global variables should be declared using a COMMON
SHARED.

Global variables and any subs or functions that are called from
other modules should be put at the beginning of each file.

TTfn,

Craig Wright___



Fri, 12 Nov 1999 03:00:00 GMT  
 Problem with linking a QuickBASIC program (urgent!!!!!)

Quoting  Rolf L?wisch:

Quote:
>>We've written an application but we can't link it. During the
>>progress of linking the linker suddenly stops and the following
>>error message occurs:
>>fatal error: size of segment exceeds 64K

>>We don't know how to solve the problem. Can anybody give
>>us a hint?

Don S replied:

Quote:
>  These computers, for all their power, can still only access 64k at a time,
>this is a SEGMENT. Your code, obviously, is attempting to create more than 64k
>of code in one SEGMENT.
>  Somewhere (half way) in your code put a $SEGMENT metastatement. This will
>tell the compiler to close-off the first segment and start on a new one.

Ep:

Hi DS!

I THINK (am pretty sure) that $SEGMENT is limited to powerbasic, which I
think Rolf (and co.) might wanna look into. For developing fast app's
easily, I've found it best. Virtually no size limit is one of the BIG
reasons, not to mention the speed, richer inherent language command set,
etc. etc.

For QB4x/PDS7x, I THINK he'll have to break it down into modules - either
overlay/chain type or SUB/FUNCTION type library modules and then link them
all together.

ie: This is alot more hassle in QB4x/PDS7x. I hiot the same problem back in
the days when I tried to covnert EBBS-PC from QB30 to QB4x. PB was my
solution.

Ep
Ed Parry - Southern California, USA

Unauthorized amphibians will be toad away.



Fri, 12 Nov 1999 03:00:00 GMT  
 Problem with linking a QuickBASIC program (urgent!!!!!)

Quote:

> Quoting  Rolf L?wisch:
> >>We've written an application but we can't link it. During the
> >>progress of linking the linker suddenly stops and the following
> >>error message occurs:
> >>fatal error: size of segment exceeds 64K

> >>We don't know how to solve the problem. Can anybody give
> >>us a hint?

> Don S replied:
> >  These computers, for all their power, can still only access 64k at a time,
> >this is a SEGMENT. Your code, obviously, is attempting to create more than 64k
> >of code in one SEGMENT.

> >  Somewhere (half way) in your code put a $SEGMENT metastatement. This will
> >tell the compiler to close-off the first segment and start on a new one.

> Ep:

> Hi DS!

> I THINK (am pretty sure) that $SEGMENT is limited to PowerBASIC, which I
> think Rolf (and co.) might wanna look into. For developing fast app's
> easily, I've found it best. Virtually no size limit is one of the BIG
> reasons, not to mention the speed, richer inherent language command set,
> etc. etc.

> For QB4x/PDS7x, I THINK he'll have to break it down into modules - either
> overlay/chain type or SUB/FUNCTION type library modules and then link them
> all together.

> ie: This is alot more hassle in QB4x/PDS7x. I hiot the same problem back in
> the days when I tried to covnert EBBS-PC from QB30 to QB4x. PB was my
> solution.

> Ep
> Ed Parry - Southern California, USA

> Unauthorized amphibians will be toad away.

1 possible solution:
You will need to break your source down down into smaller pieces. Have a
code section save the required data in 1 or more data files.  The code
needed to recall the data from the files can be fairly small. The final
piece is using the CHAIN command.  

Example...
' Other code ends here
Open "Mydata.dat" for output as #1
Print #1, Var#1
Print #1, Var#2
Print #1, Var#3
close
CHAIN "C:\Mydirectory\Myapp"

System
Chain will link you program pieces together into 1 application
regardlees if it used in intrepreted mode under QB4.5 or compiled mode.



Wed, 17 Nov 1999 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Urgent problem linking(or importing) dbf files to mdb

2. URGENT - adodc Problem on program exit...

3. Problems running script to execute programs/links or folders from Active Desktop

4. QuickBasic Help - Urgent

5. Linking C to QuickBasic

6. linking C to QuickBasic

7. QuickBasic programming help?

8. Need shell for DOS program in Quickbasic!

9. Compiling QuickBasic programs

10. Comm ports and running Quickbasic programs under windows or NT

11. QuickBasic program won't detect directories under NT

12. compiling standalone programs: QuickBasic or Turbobasic?

 

 
Powered by phpBB® Forum Software