The error in this (from your comment):
I had #include "parser.h" in the .h directory. I deleted it and now it compiles fine ...
Assuming #include "parser.h" was before typedef in catalog.h , and you have a source file that includes catalog.h before parser.h , then while the compiler includes parser.h , typedef is not available same. It is probably best to reorder the contents of the header files so that you do not have a circular dependency.
If this is not an option, you can make sure that all source files containing these two files include parser.h first (or only).
Timothy jones
source share