I have a problem.. In it's simplest form I have 2 dll's (A and B) and the main exe. The main exe needs to call functions from both A, and B, and A needs to call functions from B. But B also needs to call functions from A..
Does anyone know a way this is possible? I'm not really sure what this would be called either.
But how , When I try to include the DLL's functionality I get a recursive include.. which either gives me compilation errors. Or freezes the application. Is there a way to make sure that the DLL is only loaded once and use a reference to it rather than loading it again? I have no idea how to do such a thing.
Recursive includes are a problem whether you're using a DLL or not. You can either (a) forward declare your variables in one head file, and only include the header in your source; or (b) use explicit linking (LoadLibrary) and don't include any header files.
The main exe needs to call functions from both A, and B, and A needs to call functions from B. But B also needs to call functions from A..
When I try to include the DLL's functionality I get a recursive include..
Sorry, but I cannot see any relations between these two statments. Recursive include could happen because of using types but not functions (and therefore, the forward declaration will relly help). The sample would be good.
Besides, I cannot see any reason to have two separate dlls while they both appear depending on each other.
Last edited by Igor Vartanov; September 14th, 2009 at 07:18 AM.