From: Jon <jk...@mu...> - 2002-10-29 20:54:27
|
At 02:32 PM 10/29/2002 -0600, Derek Meek wrote: > somewhere a HWND instance named hWnd is being globally redeclaired > > ie a variable is getting declaired twice > > if you declair a variable in a .h file it will break - add "extern" > before it's declairation - but declair it the same otherwise, then in ONE > of the source modules [.cpp files] that uses it - normally the one to > which it "belongs" actually define it - just like in the header but > without the "extern" This was sent to me but I thought I'd let everyone know, this helped. I had tried this before but since I had declared extern HWND hWnd=NULL; in the .h file I got a variable redeclaration compile error in the .cpp file. So moved the =NULL part into the .cpp file and all is well. Thank you!!! Jon |