Chris,
Yes, I tried that and it didn't help. In short, here's the problem:
include file a.h is:
-------------
typedef struct {
int dummy;
} MyStruct;
-------------
include file b.h is:
----------------
typedef struct {
MyStruct dummy;
} MyOtherStruct;
----------------
I am exporting b.h. a.h is part of the project (as is a.lib), but is not exported. The compiler (exporter?) is not able to resolve the reference to 'MyStruct' in b.h.
Because of the structure of the code, I can't include a.h in b.h. (Basically, a.h is the include file for one library, and b.h is the include file for another library. Library b uses functions and definitions from library a. Applications can use functions and definitions from either a or b or both.
Since library b is built on library a, an application using library b must also include a.h, listed above b.h)
I am working around this by creating special include files, e.g.
include file b-dllexp.h is:
-----------------------
#include
typedef struct {
MyStruct dummy;
} MyOtherStruct;
----------------
Applications still use b.h (with a.h listed above it), but when creating the dll, I export from b-dllexp.h. Unfortunately, I now have two copies of everything in b.h (b.h and b-dllexp.h). This is not a good thing from a change management point of view.
Note: this problem exists even if library a is the ansi_c library. E.g., if a.h = ansi_c.h, and
include file b.h is:
----------------
typedef struct {
FILE *dummy;
} MyThirdStruct;
----------------
I can't export (i.e., 'FILE' is not recognized) unless 'ansi_c.h' is included in b.h.