undeclared variable used

Programming, for all ages and all languages.
Post Reply
vibhory2j

undeclared variable used

Post 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...
GLneo

Re:undeclared variable used

Post by GLneo »

could i see all your code in ? including the entire header?, might help?
vibhory2j

Re:undeclared variable used

Post by vibhory2j »

resolved now....
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:undeclared variable used

Post 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.
Every good solution is obvious once you've found it.
Post Reply