I've been working on the following code for several weeks. But I've come across this error and despite the huge amount of identical problems I've googled, I still can't solve it. I would appreciate a lot if someone could help :)
On the TVideoIOYuv.cpp, inside writePlane() function I call goToCorrectError() function:
Bool writePlane(ostream& fd, Pel* src, Bool is16bit,
UInt stride,
UInt width, UInt height, bool temErro, bool chroma, TComPic*& pPic,
TComList<TComPic*>::iterator itPic, TComList<TComPic*>* pcListPic)
{
(...)
goToCorrectError(itPic, pcListPic);
(..)
}
In TVideoIOYuv.h I have declared goToCorrectError as
extern void goToCorrectError(TComList<TComPic*>::iterator itPic, TComList<TComPic*>* pcListPic);
since the function is defined in TAppDecTop.cpp as:
void goToCorrectError(TComList<TComPic*>::iterator itPic, TComList<TComPic*>* pcListPic)
{
TAppDecTop aux;
TComPic* dPic = getDamagedPic();
aux.CorrectsError(itPic, dPic, pcListPic);
}
and declared in TAppDecTop.h as:
(...)
#include "TLibVideoIO/TVideoIOYuv.h"
(...)
void goToCorrectError(TComList<TComPic*>::iterator itPic, TComList<TComPic*>* pcListPic);
When I try to compile I get the "error LNK2001: unresolved external symbol "void __cdecl goToCorrectError(class std::_List_iterator > >,class TComList *)" (?goToCorrectError@@YAXV?$_List_iterator@V?$_List_val@U?$_List_simple_types@PEAVTComPic@@@std@@@std@@@std@@PEAV?$TComList@PEAVTComPic@@@@@Z)" error.
The funny part is that when I click "Go to Definition" over goToCorrectError on TVideoIOYuv.cpp it goes to its definition on TAppDecTop.cpp so it knows where it's defined. Thank you all :)