Solved

_TEXT Segment Exceeds 64K

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

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…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
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.

828 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