Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jan 2nd, 2005, 1:01 AM   #1
fosiul
Newbie
 
Join Date: Nov 2004
Posts: 6
Rep Power: 0 fosiul is on a distinguished road
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 ??
fosiul is offline   Reply With Quote
Old Jan 2nd, 2005, 1:08 AM   #2
Lance
Programmer
 
Lance's Avatar
 
Join Date: Oct 2004
Location: Chicago, IL USA
Posts: 74
Rep Power: 5 Lance is on a distinguished road
Send a message via AIM to Lance
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";
Lance is offline   Reply With Quote
Old Jan 2nd, 2005, 1:47 AM   #3
fosiul
Newbie
 
Join Date: Nov 2004
Posts: 6
Rep Power: 0 fosiul is on a distinguished road
i am using Turbo C++ version 3.0 compiler.
of Borland international .
fosiul is offline   Reply With Quote
Old Jan 2nd, 2005, 2:01 AM   #4
Lance
Programmer
 
Lance's Avatar
 
Join Date: Oct 2004
Location: Chicago, IL USA
Posts: 74
Rep Power: 5 Lance is on a distinguished road
Send a message via AIM to Lance
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";
Lance is offline   Reply With Quote
Old Jan 2nd, 2005, 3:40 PM   #5
kurifu
Expert Programmer
 
kurifu's Avatar
 
Join Date: Jul 2004
Location: Halifax, Nova Scotia (Canada)
Posts: 784
Rep Power: 5 kurifu is on a distinguished road
Send a message via ICQ to kurifu Send a message via MSN to kurifu
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
kurifu is offline   Reply With Quote
Old Jan 4th, 2005, 5:37 AM   #6
SubhadeepGhosh
Newbie
 
Join Date: Jan 2005
Posts: 4
Rep Power: 0 SubhadeepGhosh is on a distinguished road
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...
SubhadeepGhosh is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:46 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC