Please help.I am in a desperate condition.

I am getting the error message "segment _TEXT exceeds 64 k" when i am linking my program in borland turboc3 3.0 compiler.

Can anyone suggest a remedy for this.

I have tried reducing some lines of text from my program but to no help and now i can't reduce any furthur lines.

Can anyone tell how to increase the size of segment beyond 64k.

Please send your help as soon as possible as my project deadline is about to end.

Thanks in Advance
Rituraj Raina

You can't, not with that compiler... It's an old realmode DOS compiler, and in those days (say the mid 1980s) memory segments were 64KB and could not get larger.
Switch to a more modern compiler (one that was written in the last decade or so).

Thanks for your advice.

I tried using Dev-cpp compiler but i am getting error messages when i transferred the code that was working with the old compiler to the new compiler.

For ex : when i tried to include file <graphics.h>,it was giving error "unable to include file " and the same error with <iostream.h>

Also i have included many files of my project like #include"mrsgen.cpp" and it is not allowing me to include the files in such a way.

Can you please provide a solution to this.Its very urgent.

Thanks again
rituraj

DevC++ doesnt have graphics.h with it, its a borland extension. iostream.h should work if not try #include <iostream> without the .h

DevC++ doesnt have graphics.h with it, its a borland extension. iostream.h should work if not try #include <iostream> without the .h

Thanks for your help.

Its a horrible condition now since devc++ doesn't have a graphics.h & conio.h and i have written a hugh bulk of code in borland compiler and its not possible for me to make the necessary changes in the whole code to comply with dev-cpp.

Is there any option in which i can migrate my code written in borland compiler to any other new compiler without making any changes??????

I think i have to bear the crunch of my boss :sad:

Please help.................. :-|

Can you dynamically allocate some of the required memory?

I have tried dynamically allocating memory and also reducing some lines of code but to no help. :sad:

Is there anybody to help me????????????????

>segment _TEXT exceeds 64 k
Your program is too big. This has nothing to do with how many variables you use at once or how much dynamic memory is allocated. The machine code instructions and related information after compiling exceeds the limits of your implementation. Trying to fix this would be just as difficult and time consuming as porting the program to a modern implementation and graphics library. So it's up to you whether you want to fix the problem you have and probably have it pop up again later, or convert your code to work with Dev-C++ or some other new compiler. Both are equally difficult.

Dear Narue,

Thanks for your advice.

Well i have found on the internet the borland c++ 5.5 command line tools and an editor (VIDE) to work with it.

But now when i am trying to compile programs in it , then i am getting the error message " !Error : unresolved external '_main' referenced from d:\borland\bcc55\lib\c0x32.obj"

I have configured both the compiler & editor according to the docs.

Now please don't say you can't help me on this. :-|

Please help!!!!!!!!!!!!!!!

rituraj

It looks like you didn't define a main function. Because main acts as the entry point into a C program, you have no choice but to have it somewhere unless using an API that defines its own entry point such as Win32's WinMain.

This article has been dead for over six months. Start a new discussion instead.