Solved

Problems with Borland C++4.5

Posted on 1997-03-17
4
368 Views
Last Modified: 2010-08-05
Can anyone help me?.  I recently wrote a simple graphics program using
borland 3.0 compiler consisting of 12 cpp files all in one project, all
went well and i was able to link it and create an exe file.
Now for my problem, I bought Borland C++5 and used it to compile this same
project
all went well until i tried to link it i got this error " Segment_TEXT
exceeds 64k"
can any one tell me what i'm doing wrong.
thanx in advance.
                            NEWBEE,
0
Comment
Question by:mwebster
  • 2
  • 2
4 Comments
 
LVL 3

Accepted Solution

by:
gaohong earned 50 total points
ID: 1162304
Try to break largest cpp file into two or  more files
0
 

Author Comment

by:mwebster
ID: 1162305
I tried this but it still did not work here is what my project looks like
node1[cpp]code size=1596 lines=144 data size=17
node2[cpp]code size=425 lines=42 data size=483
node3[cpp]code size=537 lines=43 data size=483
node4[cpp]code size=537 lines=42 data size=483
node5[cpp]code size=2764 lines-175 data size=74
node6[cpp]code size=397 lines=34 data size=20
node7[cpp]code size=988 lines=127 data size=145
node8[cpp]code size=1412 lines=123 data size=60
node9[cpp]code size=378 lines=71 data size=2
node10[cpp]code size=1352 lines=101 data size=335
node11[cpp]code size=1508 lines=175 data size=91
node12[cpp]code size=1239 lines=172 data size=353
node13[cpp]code size=1905 lines=424 data size=48
node14[cpp]code size=2956 lines=222 data size=218
node15[cpp]code size=3046 lines=268 data size=100
node16[cpp]code size=2651 lines=200 data size=340
node17[cpp]code size=765 lines=52 data size=620
node18[cpp]code size=2961 lines=240 data size=447

from 12 to 18 and I'm still getting SEGMENT_TEXT exceeds 64k
0
 
LVL 3

Expert Comment

by:gaohong
ID: 1162306
Check your compiler settings. Make sure you select large memory
model, under memory model, check first three options, which
are put constant strings in code segment, far virtual table,
automatic far data. Set far data threashold 20000.

Under code generation, check Duplicate strings merged.

Aha, for BC5.x, use explorer find windows\system\conagent
property/memory check all auto.

good luck

gaohong xie
0
 

Author Comment

by:mwebster
ID: 1162307
thanx it worked great but this program was compiled using Small memory module in borlandc 3.0, why does'nt the same go for borlandc 5.0
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

757 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

21 Experts available now in Live!

Get 1:1 Help Now