Solved

_TEXT Segment Exceeds 64K

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

Scale it in WD Gold

With up to ten times the workload capacity of desktop drives, WD Gold hard drives employ advanced technology to deliver among the best in reliability, capacity, power efficiency and performance.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Inorder binary search tree 5 158
Line meaning 9 81
IIS Log files on Exchange 2013 server 6 80
Assigning default value to structure in C for mutithread application 17 54
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…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
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 and use switch statements in the C programming language.

911 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

23 Experts available now in Live!

Get 1:1 Help Now