?
Solved

_TEXT Segment Exceeds 64K

Posted on 1997-05-23
3
Medium Priority
?
2,201 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
tovergaard earned 300 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.
Suggested Courses

765 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