Well, in this instance I need the actual struct resident not pointers.
Here is a closer example:
/* file A.h * * * * * * */
#ifndef A_H
#define A_H
struct A
{
struct B b;
};
/* file B.h * * * * * * */
#ifndef B_H
#define B_H
#include "A.h" /* some other resource in A.h is needed */
struct B
{...};
/* main.c * * * * * * */
#include "A.h" /* needs resources in A.h and B.h */
#include "B.h"
This can become a problem when I must always be assured that "B.h" is
preprocessed before "A.h".
I don't understand this at all. The code in your closer example here is
completely different from your original code. Your original code was
impossible to compile, even theoretically, as you had structures that
included themselves.
This code, however, has a structure including a structure including
something unknown. As long as that unknown isn't either of these two
structures, your program can be solved with careful attention to
preprocessing.
What are the "resources" you speak of? Structures? Typedefs? Macros?
Actual code? Knowing this is *very* important to determine whether
your problem can be solved.
Do you mean that "A.h" must use types defined in "B.h" and vice versa?
I don't see any way of doing this other than making a separate header
file including all the types that either file needs from the other and
making both #include it.
It's just strange that between your two posts, the entire problem
changed from a struct type problem to a preprocessing problem.