Problems compiling multiple cpp files
Posted on 2000-05-06
I'm going to be working on a big project so instead of putting everything in one big file i thought it would be better if i split it all up. I have the following files:
winproc.cpp - contains the winproc function
winmain.cpp - contains winmain and similar functions
globals.h - contains global variables and function definitions.
When i goto compile i get the following errors:
winproc.obj : error LNK2005: "struct HINSTANCE__ * hInstance" (?hInstance@@3PAUHINSTANCE__@@A) already defined in winmain.obj
Debug/MASTER.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.
How would i fix this?