Solved

_TEXT Segment Exceeds 64K

Posted on 1997-05-23
3
2,125 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
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…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

813 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

9 Experts available now in Live!

Get 1:1 Help Now