Linker error _text exceeds 64K.I must do it . I do everting but not result. I make large project.I to try to split in section but still error(Linker error _text exceeds 64K) any body help me,please.I sent project to teacher
Linker error _text exceeds 64K.I must do it . I do everting but not result. I make large project.I to try to split in section but still error(Linker error _text exceeds 64K) any body help me,please.I sent project to teacher
What compiler are you using?
Also, what platform are you working on?
One handy little trick is to take that error, paste it into the search box on Google and see what you find.....
What odds do you give me it's Turbo C 2.x?
[edit]
We could start a pool.
TC 1.x --
TC 2.x -- My vote.
TC 3.x --
Miracle C --
...insert something else here...
[/edit]
Quzah.
Last edited by quzah; 01-06-2006 at 09:54 PM.
Hope is the first step on the road to disappointment.
i use turbo c++ 3.0
I try post error in google but read unknowable
If your operating system is not actual DOS, then get a newer compiler.
7. It is easier to write an incorrect program than understand a correct one.
40. There are two ways to write error-free programs; only the third one works.*
And if it is actual DOS, then get a newer operating systemOriginally Posted by Dave_Sinkula
Probably means that all the code is in the same .c file, and now it's time to split that file up into several modules (each of which will get their own 64K).
But even when you've done that, you also need to tell the compiler to use say "large" model code.
I must sent teacher,Uhhhhh unnn ,i want to cry.uhhh
I already TELL compiler large model but still not result.hmmmmmmmm.ummmmmmmm,I want to cry!
> I already TELL compiler large model but still not result
That's only half the job - you also need multiple source files. The compiler will put each source file into a separate 64K section, but if you only have ONE source file, then you haven't actually done much.
Example, this is what you have
Exactly how you call your compiler (probably not cc) is up to you.Code:// main.c #include <stdio.h> void someFunc ( int param ) { printf( "hello, someFunc called with %d\n", param ); } int main ( ) { printf( "Hello from main\n" ); someFunc ( 1234 ); return 0; } // which would be compiled with // cc main.c
But you want to get into this kind of situation here, two source files and a header file.
Exactly how many func.c files you need is entirely up to you, but since you've probably just gone over the limit, and with no time left, I would suggest just two files.Code:// func.c #include <stdio.h> #include "func.h" void someFunc ( int param ) { printf( "hello, someFunc called with %d\n", param ); } // func.h #ifndef FUNC_H_INCLUDED #define FUNC_H_INCLUDED void someFunc ( int param ); #endif // main.c #include <stdio.h> #include "func.h" int main ( ) { printf( "Hello from main\n" ); someFunc ( 1234 ); return 0; } // which would be compiled with // cc main.c func.c
Put half your functions in func.c, put all the prototypes for those functions in func.h and leave the rest in your main.c file.
thank you very much everybody . i make project finish.and it perfect too.