How can I prevent these link errors, besides keeping all variables and functions in main.cpp?
VC++6.0 project attached...Code:main.obj : error LNK2005: "struct HINSTANCE__ * hInst" (?hInst@@3PAUHINSTANCE__@@A) already defined in button.obj main.obj : error LNK2005: "struct HWND__ * hWndCmd1" (?hWndCmd1@@3PAUHWND__@@A) already defined in button.obj main.obj : error LNK2005: "struct HFONT__ * hFont" (?hFont@@3PAUHFONT__@@A) already defined in button.obj Release/test.exe : fatal error LNK1169: one or more multiply defined symbols found




Reply With Quote