I've got the usual Visual C++ MFC program going. It's got a main dialog, with two (not-main?) dialogs that are called with DoModal().
The thing is that those two dialogs need the same files, which have the same functions and classes.
Here's an example of what I mean
And then the header for both of the *.cpp files that apply to the DoModal dialogs looks like this:
//code to do something in here
int DoSomethingAsWell ( int i )
//Do something here
This code results in a bunch of linker errors (LNK2005, and LNK1169 for the last error). It's telling me the functions already exist in the other dialogs .obj file, however, if I don't include the file in the *.cpp file, it says that the functions/classes don't exist. So, it's either it doesn't exist, or it's already been defined!
Here's the actual link error:
If you guies need the actual source code I'd be happy to post that as well.
Originally Posted by Micro$oft
Thanks in advance,