Created
December 15, 2011 14:16
-
-
Save jvranish/1481228 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef MODULEA_H | |
#define MODULEA_H | |
#include "moduleB.h" | |
typedef struct | |
{ | |
... | |
} ModuleAType; | |
void SomeFunctionA(ModuleAType* a, ModuleBType* b); | |
#endif /* MODULEA_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef MODULEB_H | |
#define MODULEB_H | |
#include "moduleA.h" | |
typedef struct | |
{ | |
ModuleAType someField; // <----- this is the tricky bit | |
} ModuleBType; | |
void SomeFunctionB(ModuleAType* a, ModuleBType* b); | |
#endif /* MODULEB_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef MODULEB_H | |
#define MODULEB_H | |
#include "moduleA.h" | |
struct ModuleBType_s; | |
typedef struct ModuleBType_s ModuleBType; | |
void SomeFunctionB(ModuleAType* a, ModuleBType* b); | |
#endif /* MODULEB_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef MODULEB_TYPES_H | |
#define MODULEB_TYPES_H | |
#include "moduleA.h" | |
struct ModuleBType_s | |
{ | |
ModuleAType someField; | |
}; | |
#endif /* MODULEB_TYPES_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "moduleA.h" | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "moduleA.h" | |
#include "moduleB_types.h" | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct | |
{ | |
ModuleAType someField; // <----- this is the tricky bit | |
} ModuleBType; | |
void SomeFunctionB(ModuleAType* a, ModuleBType* b); | |
typedef struct | |
{ | |
... | |
} ModuleAType; | |
void SomeFunctionA(ModuleAType* a, ModuleBType* b); | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment