Thanks
I have went through the Manpages.
My question is
http://inst.eecs.berkeley.edu/~selfpace/studyguide/9F.sg/Output/linker.errors.html
at that link i have read like when. a function call does not find the body during linking it gives error undefined first reference.
so when i am using
Code:
nm libxyz.a
[132] | 0| 0|NOTY |GLOB |0 |UNDEF |__adcds
i felt
[132] | 0| 0|NOTY |GLOB |0 |UNDEF |__adcds
maning this is for _adcds if havent found the corrosponding definition it is unresolved
does it mean like once a lib is formed correctly. it should not give UNDEF in nm command or those unresolved can be resolved when it is linked with other libs??
I could see in one my
Code:
String.C
#include<stdio.h>
#include <String.h>
#include <ctype.h>
void main()
{
cerr<<"";
}
when i compiled the code with CC compiler I could see .o file get generated.
.o is being used in the generation of xyz.a file,.a also generated.
when i ve seen
Code:
nm xyz.a|grep "cerr"
[44] | 0| 0|OBJT |GLOB |0 |UNDEF |cerr
[54] | 0| 0|OBJT |GLOB |0 |UNDEF |cerr
[87] | 0| 0|OBJT |GLOB |0 |UNDEF |cerr
[22] | 0| 0|OBJT |GLOB |0 |UNDEF |cerr
[33] | 0| 0|OBJT |GLOB |0 |UNDEF |cerr
[28] | 0| 0|OBJT |GLOB |0 |UNDEF |cerr
[33] | 0| 0|OBJT |GLOB |0 |UNDEF |cerr
[18] | 0| 0|OBJT |GLOB |0 |UNDEF |cerr
[18] | 0| 0|OBJT |GLOB |0 |UNDEF |cerr
[239] | 0| 0|OBJT |GLOB |0 |UNDEF |cerr
[39] | 0| 0|OBJT |GLOB |0 |UNDEF |cerr
[22] | 0| 0|OBJT |GLOB |0 |UNDEF |cerr
[20] | 0| 0|OBJT |GLOB |0 |UNDEF |cerr
[31] | 0| 0|OBJT |GLOB |0 |UNDEF |cerr
[57] | 0| 0|OBJT |GLOB |0 |UNDEF |cerr
[25] | 0| 0|OBJT |GLOB |0 |UNDEF |cerr
[48] | 0| 0|OBJT |GLOB |0 |UNDEF |cerr
[48] | 0| 0|OBJT |GLOB |0 |UNDEF |cerr
[19] | 0| 0|OBJT |GLOB |0 |UNDEF |cerr
[18] | 0| 0|OBJT |GLOB |0 |UNDEF |cerr
[21] | 0| 0|OBJT |GLOB |0 |UNDEF |cerr
[29] | 0| 0|OBJT |GLOB |0 |UNDEF |cerr
[30] | 0| 0|OBJT |GLOB |0 |UNDEF |cerr
[63] | 0| 0|OBJT |GLOB |0 |UNDEF |cerr
[21] | 0| 0|OBJT |GLOB |0 |UNDEF |cerr
[72] | 0| 0|OBJT |GLOB |0 |UNDEF |cerr
[42] | 0| 0|OBJT |GLOB |0 |UNDEF |cerr
as cerr is function which has to come from header file
but it is saying UNDEF
MY dought
1.if cerr is not in header how code get compiled
2.does it mean like during linking phase it is looking for function body error thrown,header contains Prototype so during compilation time no error was thrown...
if 2 is right am i missing any file during linking
as i could clearly see when i have used 4.3 compiler no issues but 5.8 i am getting this issue
Regards,
Revathi.