Guest User

Untitled

a guest
Aug 30th, 2013
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. a.h###################
  2. typedef struct a{
  3. ...
  4. }a_t;
  5. a.c###################
  6. #include "a.h"
  7. b.h###################
  8. typedef struct b{
  9. a_t* pointer_a;
  10. ....
  11. }b_t;
  12. b.c###################
  13. #include "a.h"
  14. #include "b.h"
  15. #########################################
  16. ...-> other stuff not relevant in this case
  17. this is part of a project which was working and which i'm refactoring
  18. i've used include guards in every a.h, b.h, etc.
  19. i just removed some unused functions from it up to now.
  20. i don't understand what the cause of the problem might be.
  21. whenever i try to compile i get the message:
  22. unknown type name 'a_t' for b.h
  23. however, in the project i've used the same technique in several places and
  24. the compiler doesn't seem to complain.
  25. i've used a_t* in the same exact way in other files (c.h, d.h, etc.)
  26. and i don't have any problem there.
  27. in b.c i include first a.h, then b.h, does the order matter?
  28. i never import a .h in another .h
  29. i extensively searched before asking.
  30. what am i doing wrong here?
  31. maybe circular import dependencies?
  32. maybe the compile order? does it matter?
  33. thank you
Advertisement
Add Comment
Please, Sign In to add comment