First a little code:
class CDb
{
public:
void CreateLeague(const League &data);
protected:
int InsertOwners(const std::vector<std::string> &owners, int leagueId);
};
void CDb::CreateLeague(const League &data)
{
// some code
if( InsertOwners( data.GetOwners(), leagueId ) != SQLITE_OK )
{
// ROLLBACK transaction
}
}
int CDb::InsertOwners(const std::vector<std::string> &owners, int leagueId)
{
}
Function GetOwners()
is declared as:
std::vector<std::string> &GetOwners() const;
During linking I'm getting following:
unresolved external symbol "protected: int __thiscall CDb::InsertOwners(class std::vector,class std::allocator >,class std::allocator,class std::allocator > > > const &,int)" (?InsertOwners@CDb@@IAEHABV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@H@Z) referenced in function "public: void __thiscall CDb::CreateLeague(class CLeagueSettings const &)" (?CreateLeague@CDb@@QAEXABVCLeagueSettings@@@Z) 1>vc_mswud\baseballdraft.exe : fatal error LNK1120: 1 unresolved externals
Using MSVC 2010 on Windows 7.
Please help.
CDb::InsertOwners()
is part of the project and actually getting compiled? – Frédéric Hamidi