error LNK2005: "public: __thiscall ClientList::ClientList(void)" (??0ClientList@@QAE@XZ) already defined in serverApp.obj in file: serverDlg.obj

I get this error when i try to include my header I wrote.
I looked this up on MSDN but don't get it. Its an MFC project if that helps. My clientlist header is just c++ not MFC.

This error typically means that the file clientList.cpp is not linked to by the project. Try to produce the fewest lines of code that will produce this message and we can check if anything else looks wrong of if the project is simply mis configured.


I started to define my functions in the header file instead of a cpp file. If i comment out the functions though, i do not get this error.

Well, I moved my functions to a seperate cpp file and it works. Can you explain why this is? Thanks