Hi,
I am getting link error messages on the following function. VC7.
Any ideas ?
Thanks in Advance.
Rich.
(ATPModeTypes is an enum)
Here is the exact error message:
Linking...
RA_Control.obj : error LNK2019: unresolved external symbol "bool __cdecl ExistsInList<enum ATPModeTypes>(enum ATPModeTypes,enum ATPModeTypes,...)" (??$ExistsInList@W4ATPModeTypes@@@@YA_NW4ATPModeTypes@@0ZZ) referenced in function "void __cdecl ControlEventReceived(short,bool)" (?ControlEventReceived@@YAXF_N@Z)
.\Debug/RA.exe : fatal error LNK1120: 1 unresolved externals
I am getting link error messages on the following function. VC7.
Any ideas ?
Thanks in Advance.
Rich.
Code:
template<class T>
bool ExistsInList(T Value, T Expr, ...)
{
// NOTE: list terminates with -1
va_list Argp;
T chk = Expr;
va_start(Argp,Expr);
while (chk != Value)
if (-1 == (int) (chk = va_arg(Argp,T)))
break;
va_end(Argp);
return (chk == Value);
}
ATPModeTypes GetATPMode()
{
return ATPMode;
}
...
if (ExistsInList<ATPModeTypes>(GetATPMode(),ATPSelfTestDone,ATPLongSelfTestMode,ATPShortSelfTestMode,-1)) {
....
}
Here is the exact error message:
Linking...
RA_Control.obj : error LNK2019: unresolved external symbol "bool __cdecl ExistsInList<enum ATPModeTypes>(enum ATPModeTypes,enum ATPModeTypes,...)" (??$ExistsInList@W4ATPModeTypes@@@@YA_NW4ATPModeTypes@@0ZZ) referenced in function "void __cdecl ControlEventReceived(short,bool)" (?ControlEventReceived@@YAXF_N@Z)
.\Debug/RA.exe : fatal error LNK1120: 1 unresolved externals