Advertisement

TOC size of 72807 bytes exceeds 64k limit

Started by November 09, 2000 05:23 PM
11 comments, last by David20321 24 years ago
How do I fix this? I assume this means that I have too much code and should get rid of some, but there has to be a way to fix this error without cutting out pieces of my program. HELP!!!! Thanks, -David
What compiler gave you this error, and in what context? (compile, link, etc.)

My first guess is that you have too much code in a single source file and need to separate the source file into multiple source files.
Advertisement
Codewarrior gave me this error when I was trying to compile. I have a bunch of different source files, one for my main stuff and one for each of my sets of animations for my model. They total up to more than 70,000 lines I think, and since they're all in different files I'm not sure what the problem is. I have one main .cpp and a couple other .cpp files with .h files.

Edited by - David20321 on November 9, 2000 9:21:23 PM
In that case the problem is that you''re putting too many different exported symbols within the same object file. Each .cpp file compiles to a single object file, so what you really need to do is to break up the .cpp file into multiple .cpp files, not necessarily covert the .h files into .cpp files.
I have more than 100 global variables and I''m not sure how I can share them between the two halves of my main .cpp file. My globals are in another .cpp file.
If your globals are already in another .cpp file then there should be no problem sharing them with additional .cpp files.
Advertisement
If I try to "#include ''Globals.h''" in the second file it says that all those variables are already defined and if I don''t use the #include "Globals.h" then it says "undefined identifier". Do you know how I''m supposed to do this?
you''re not compiling in a 16bit environment etc by any chance i remember having this problem back in the early 90''s

http://members.xoom.com/myBollux
quote: Original post by David20321

If I try to "#include ''Globals.h''" in the second file it says that all those variables are already defined and if I don''t use the #include "Globals.h" then it says "undefined identifier". Do you know how I''m supposed to do this?



At the top of globals.h, put this:

#ifndef _GLOBALS_H_
#define _GLOBALS_H_

and at the very bottom:

#endif

What this does, is only compiles it once.. so you don''t get all those redefinitions
yes that should work thats the trouble when u just look at the subject heading of a post

http://members.xoom.com/myBollux

This topic is closed to new replies.

Advertisement