最初の小さなコード:
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)
{
}
関数GetOwners()
は次のように宣言されます:
std::vector<std::string> &GetOwners() const;
リンク中に私は次のようになります:
未解決の外部シンボル"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)関数 "public:void __thiscall CDb :: CreateLeague(class CLeagueSettings const&)"( ?CreateLeague @ CDb @@ QAEXABVCLeagueSettings @@@ Z)1> vc_mswud \ baseballdraft.exe:致命的なエラーLNK1120:1つの未解決の外部
Windows7でMSVC2010を使用する。
助けてください。