LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   C: global typedefs (http://www.linuxquestions.org/questions/programming-9/c-global-typedefs-121287/)

dominik81 11-30-2003 12:14 PM

C: global typedefs
 
Hi!

I'm having trouble with typedefs in C (using gcc 3.3.1).

This is what I have:
- file "main.c"
- file "objects.c"
- file "objects.h" with "typedef struct { ... } objects;" in it.

I can use the type "objects" in main.c and initialize variables of this type. But I cannot create variables from within objects.c! What am I doing wrong? It does work however when I put the typedef again in my objects.c but I think that's quite redundant.

coolman0stress 11-30-2003 02:34 PM

are you including "objects.h" in "objects.c"?


All times are GMT -5. The time now is 08:16 PM.