Posted on 2003-10-30
I am really stuck in this link error.
I am working on a simple multithreaded project. There are three threads involved: the main thread-a simple dialog interface, a timer thread, and a test thread. The timer thread is implemented as a timer class. The test thread does is to pop up a message when timeout. The functionality of this project is pop up a message at a certain time interval ( determined by timeout value of the timer). I declared a HANDLE as global along with the test thread function in a header file, and I did use ifdef directive in this header file. When I build the project, I always got this link error saying the HANDLE variable is already defined. What could go wrong here? Since it is not convenient to post the whole project code here, if someone is interested and would like to help, I could send you the complete project source.
I would appreciate any suggestion.