I also have a TextEdit.cpp (where main() is) and a MyFuncs.cpp (where all my functions are). Both TextEdit.cpp & MyFuncs.cpp both have the following line at the top: #include "HEADER.h"
Yet when I compile I get this error:
1 2
1>TextFunctions.obj : error LNK2005: "bool USEFIN" (?USEFIN@@3_NA) already defined in TextEditor.obj
1>C:\Users\cartpauj\Documents\Visual Studio 2008\Projects\TextEditor\Debug\TextEditor.exe : fatal error LNK1169: one or more multiply defined symbols found
Tried bool extern USEFIN = false; in TextEdit.cpp - FAILED!
Tried extern bool USEFIN = false; in TextEdit.cpp - FAILED!
Tried the same for MyFuncs.cpp and both failed.
What am I missing?
If i get rid of the header and functions file and combine it all into an overloaded main file it works just fine.