undeclared variable used
Posted: Sun Apr 16, 2006 7:19 am
Hi all,
I am using two variables in one file. these variables are idtp and gdtp. both are of structure type which have one of their each feild pointing to a distinct table in memory.
now i want to use these variables in another c program file. so i included the header file which contains the declaration of these varialbles. i have correctly done this all.
Now when i compile this another c program it correctly picks up the gdtp variable but shows error "undeclared variable used "idtp". first time used in the file" ... for the variable idtp.
i have tried everything i could... like i tried declaring the the variables as extern in start of another c program file. i cant figure out what the problem could be.
i am using gcc on redhat linux 9.0.
Any help would be heartly appreciated...
I am using two variables in one file. these variables are idtp and gdtp. both are of structure type which have one of their each feild pointing to a distinct table in memory.
now i want to use these variables in another c program file. so i included the header file which contains the declaration of these varialbles. i have correctly done this all.
Now when i compile this another c program it correctly picks up the gdtp variable but shows error "undeclared variable used "idtp". first time used in the file" ... for the variable idtp.
i have tried everything i could... like i tried declaring the the variables as extern in start of another c program file. i cant figure out what the problem could be.
i am using gcc on redhat linux 9.0.
Any help would be heartly appreciated...