Parsing a LNK2005 error

If someone has the time, I would like help parsing the pieces of this LNK2005 error:

MFP1.obj : error LNK2005: "void __cdecl fnCloseFiles(class std::basic_ifstream<char,struct std::char_traits<char> > &,class std::basic_ofstream<char,struct std::char_traits<char> > &)" (?fnCloseFiles@@YAXAAV?$basic_ifstream@DU?$char_traits@D@std@@@std@@AAV?$basic_ofstream@DU?$char_traits@D@std@@@2@@Z) already defined in CodeSnippetTester.obj

I'm not even using this function in the source file, so I don't know why I'm getting an existing definition in the object. "using namespace std;" is in the source file, but not the header file.

Thanks for any and all help.

ERandall
From the linker error message it follows that the same function fnCloseFiles was defined in two modules, MFP1.obj and CodeSnippetTester.obj

So check your project.
Topic archived. No new replies allowed.