c++ static library dependencies, header including header
===

so I'm working on upgrading the architecture of application to a more modular design. It's a C++ application which uses an underlying monolithic c-library if we are building for a specific target, otherwise it uses a different library back-end. 

Currently the application front-end code, the GUI code, is directly tied to the monolithic c-library, which only works on one target. What has been done is the monolithic c-library has been put into a "module" which exposes a common C++ interface for the GUI part of the application to consume. This way we can change build targets and the GUI code doesn't change. The previously existing GUI code uses structures defined within the C-library, which are common to all possible c-libraries. 

Inside the C++ module I've defined sort-of proxy types which look like so:

    //ModuleTypes.hpp
    typedef CPP_TYPE C_LEGACY_TYPE;

and the GUI code simply uses CPP_TYPE in-place of the previously existing C_LEGACY_TYPE.

Elsewhere in the module project, Module.hpp looks like:

    //Module.hpp
    #include "C_LEGACY_TYPES.hpp"
    ...
    #include "ModuleTypes.hpp"

So when the C++ module gets compiled into a static lib, Module.hpp includes C_LEGACY_TYPES.hpp before ModuleTypes.hpp (so ModuleTypes.hpp knows what C_LEGACY_TYPE is),
and the static library compiles just fine.

The problem is in the GUI module, where for example:

    //Gui1.hpp
    class Gui1 {
        void Method1(CPP_TYPE value);
    };

Since CPP_TYPE cannot be forward declared, at the top I add #include "ModuleTypes.hpp" to Gui1.hpp.

    //Gui1.hpp
    #include "ModuleTypes.hpp"
    class Gui1 {
        void Method1(CPP_TYPE value);
    };

   When I go to compile the GUI module, it errors because it can't figure out what C_LEGACY_TYPE is. The only way to solve this is to #include "C_LEGACY_TYPE.hpp" inside ModuleTypes.hpp. This however leads to GUI having to know where the legacy C headers are when it gets compiled.

I would like GUI.hpp to #include "ModuleTypes.hpp" but use the definition of C_LEGACY_TYPE from the static library, and not have to #include "C_LEGACY_TYPES.h" inside "ModuleTypes.hpp."

I understand why the error is happening, I'm looking for an alternative solution. How do I get the GUI module to be able to use the types defines in ModuleTypes.hpp without having to include the legacy headers when compiling the GUI module?

With the architecture change we're migrating the C++11 so I'm open to any suggestions. VC2010 is what we're building with.