Re: Cross-Calling W/ Modules
Sure, it's possible.
Viggy
Re: Cross-Calling W/ Modules
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.
Re: Cross-Calling W/ Modules
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.
Viggy
Re: Cross-Calling W/ Modules
Thanks ^_^, I figured out that for what I am trying to do, the LoadLibrary is the best option for me =\ a little cumbersome looking in the initialization but it works, I appreciate the response ^_^.
Re: Cross-Calling W/ Modules
Quote:
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..
Quote:
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.