This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
I am building a c++ project from command like in ccsv5.
While linking I am getting a redefinition error from multiple object file for a variable which is used as "local variable" in all the files.Not sure why a local variable symbol is getting rdfined while linking. Also the error is not coming while the complete project compilation.
error #10056: symbol "eRc" redefined: first defined in
"../build/obj/App.o"; redefined in
"../../A/B/build/obj/Entity.o"
regards
Soumya
Most likely, this variable is a global variable defined in a header file. The declaration of a variable in a header file should use the "extern" keyword.
If this is not the problem, please post a compilable test case that demonstrates the problem.
Yes, you are right.By mistake we left a global definition i header file.
thanks
Soumya