I'm writing a program that is made of several cpp files, and when I link them together, and try compiling them, I get errors like the ones below, but when I change the name of the functions(eg. void joinsession(); becomes void join1(); ) it compiles fine a few times, but after a while the errors come back, even when the code has hardly changed, and the only way (that I know of) to solve it is to change the names again. It's really starting to annoy me, but I have no idea why it does it.
Any ideas?
Code:main_winsock.o(.text+0x22):main_winsock.cpp: multiple definition of `joinsession()' Project1.o(.text+0x22):Project1.cpp: first defined here main_winsock.o(.text+0x288):main_winsock.cpp: multiple definition of `hostsession()' Project1.o(.text+0x288):Project1.cpp: first defined here