When I try your code (VC++ 6, WinXP sp3), it compiles just fine. What is the exact wording of the error?
error LNK2001: unresolved external symbol _setlocale
would indicate you didn't link a
C run time library[
^].
error C2065: '_tsetlocale' : undeclared identifier
would imply the #define hasn't been read. One possibility I could think of that would cause this is that the wrong TChar.h has been read. You use a quoted include rather than an angle-bracket include, which means it first scans your project directory before searching in the compiler's include path.
You could try hardcoding the path in the #include to eliminate this possibility;
#include "C:/Program Files/Microsoft Visual Studio/VC98/Include/TChar.h"