I am writing a program for the selection of films to the user on the basis of the films he previously liked. The parser of the file file seemed to be working, but not the problem: it gives 6 LNK2019 errors to an unresolved external character (judging by LINK1120 there are 3 such places), something like something wrong with inline getId() const .
Error example:
Error LNK1120 Unresolved External Elements: 3 FilmSelection
C: \ Users \ Andrey \ Documents \ GitHub \ FilmSelection \ FilmSelection \ FilmSelection \ De bug \ FilmSelection.exe 1
Error LNK2019 link to unresolved external character "public: class std :: basic_string, class std :: allocator> __thiscall Channel :: getId (void) const" (? GetId @ Channel @@ QBE? AV? $ Basic_string @ DU? $ Char_traits @ D @ std @@ V? $ Allocator @ D @ 2 @@ std @@ XZ) in the function "public: class std :: shared_ptr __thiscall User :: findChannel (class std :: basic_string, class std :: allocator>) "(? findChannel @ User @@ QAE? AV? $ shared_ptr @ VChannel @@@ std @@ V? $ basic_string @ DU? $ char_traits @ D @ std @@ V? $ allocator @ D @ 2 @@ 3 @@ Z) FilmSelection C: \ Users \ Andrey \ Documents \ GitHub \ FilmSelection \ FilmSelection \ FilmSelection \ FilmSelection \ User.obj 1
inline string Channel::getId() const; // public метод, который я вызываю через shared pointer на данный класс { return id; //id является private string } //поиск фильма, у Film есть аналогичный метод получения getId(), films - это list<shared_ptr<Film>> films //increaseLikes() увеличивает количество лайков для канала и аналогично для фильма shared_ptr<Film> Channel::findFilm(string id_film) { for (auto it = films.begin(); it != films.end(); it++) if (id_film == (*it)->getId()) { (*it)->increaseLikes(); return (*it); } return nullptr; } Here is the source GITHUB