Solved

_TEXT Segment Exceeds 64K

Posted on 1997-05-23
3
2,094 Views
Last Modified: 2011-09-20
I just inherited some c code which runs on a Janus barcode scanner device.
It was developed using the Borland C compiler on the PC.  I guess the
barcode device runs a mini version of DOS.

I've made no source changes yet, I'm trying to get the existing code to
build using the Borland C++ 4.5 environment.

Problem #1 - I get a bunch of warnings from Bcc regarding 'Possibly
incorrect assignment...' and then a message:

Error: Unable to execute command 'tlink.exe'

Problem #2 - When I run tlink manually, I get the the following error:

>tlink esd.obj d:\bc45\lib\ch.lib
Turbo Link  Version 7.00 Copyright (c) 1987, 1994 Borland International
Error: Segment _TEXT exceeds 64K

Thanks for any insight you have.

-- John

P.S.

I have used the -mh option for Bcc to indicate the huge memory model, and as the tlink command line indicates, I have been attempting to link with ch.lib library for the huge memory model.  Is there something I'm missing in the Borland command line directives?
0
Comment
Question by:johnjab
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
tovergaard earned 100 total points
ID: 1250513
I think the second problem is because you are using a wrong memory model. Check what the documentation says you must use, if no documentation or no info about memory model, try to use large or huge memory model.

The first problem, part 2, unable to execute command tlink.exe is often cause by a wrong setup. I.e. the setup don't point to the library with the tlink, or no path to the program.

The first problem, part 1, it is a warning, so dont care if you haven't changed the program.



0
 

Author Comment

by:johnjab
ID: 1250514
Edited text of question
0
 

Author Comment

by:johnjab
ID: 1250515
It turns out that my question was more about the specific installation and project settings for Borland C++ V4.5 than about the c language.  Tovergaard's answer pointed me in the right direction.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now