Page 1 of 1

undeclared variable used

Posted: Sun Apr 16, 2006 7:19 am
by vibhory2j
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...

Re:undeclared variable used

Posted: Sun Apr 16, 2006 7:57 am
by GLneo
could i see all your code in ? including the entire header?, might help?

Re:undeclared variable used

Posted: Sun Apr 23, 2006 4:38 pm
by vibhory2j
resolved now....

Re:undeclared variable used

Posted: Mon Apr 24, 2006 3:46 am
by Solar
It would be nice to hear the solution, so that someone else searching the forum later would not only know that you had the same problem, but also how you resolved it.