Solved

Problems with Borland C++4.5

Posted on 1997-03-17
4
380 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
[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
  • 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
C++ standard library based binary archive format 6 112
Should CArray be used for a list of pointers in C++? 19 143
C++ question 3 81
draw a Christmas tree by using a nested loop? 26 105
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…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

734 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