![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Nov 2004
Posts: 6
Rep Power: 0
![]() |
hi all, when i am trying to complile a program its giving me " linker Error : segment_text exceeds 64 K " this error, Can any one help me to find
out how to solve this problem ?? |
|
|
|
|
|
#2 |
|
Programmer
|
Umm, what are you compiling? How are you compiling it?
And is this an 80286? They have a 64KB binary segment limit. As well some older architectures.
__________________
/* LANCE */ C++; /* this makes C bigger but returns the old value */ char *site = "slackwise.net", *home = "lance.slackwise.net", *pics = "flickr.com/photos/slackwise"; |
|
|
|
|
|
#3 |
|
Newbie
Join Date: Nov 2004
Posts: 6
Rep Power: 0
![]() |
i am using Turbo C++ version 3.0 compiler.
of Borland international . |
|
|
|
|
|
#4 |
|
Programmer
|
Unfortunately, your reply answered none of my questions. So I really can't even give you a remote hint as to what is at fault.
Oh, and that compiler is worthless. Try GCC. Or if you're using Windows, try DJGPP.
__________________
/* LANCE */ C++; /* this makes C bigger but returns the old value */ char *site = "slackwise.net", *home = "lance.slackwise.net", *pics = "flickr.com/photos/slackwise"; |
|
|
|
|
|
#5 |
|
Expert Programmer
|
My guess is that you are trying to allocate too much memory in the local stack in one of your functions, or maybe even several of them.
I do have to point out that you are using a very old version of Borland C++ Builder, and today's compilers (Borland C++ 5.02 which is also free to download and use) have greater capabilities, especially when working with memory limitations. You might want to consider moving some of your data off the stack and onto the heap if that is possible. You will need to have a half decent understanding of pointers I suspect if you want to do that. Have you been able to locate the offending piece of code yet?
__________________
Clifford Matthew Roche <geek@cliffordroche.com> Web Hosting: http://www.crd-hosting.com Consulting: http://www.crdev-consulting.com |
|
|
|
|
|
#6 |
|
Newbie
Join Date: Jan 2005
Posts: 4
Rep Power: 0
![]() |
Hey,
Since you are using Turbo C (which is a 16bit compiler) you cannot have a segment which is larger that 64Kb (2^16) that is the addressing limit of a register...so if you are trying to alloate more than 64Kb of memory (either by using a big array or by using malloc) then that is not possible...The only option then would be to switch over to a 32bit compiler (where you can get 2Gb of address space)...depending on the OS (which I guess is Windows in your case) you can use the following compiler... GCC for Linux or Windows Dev-C++ for Windows...it comes with it's own IDE and uses the GCC compiler... |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|