This is a quite a annoying error, supposedly Visual Studio 2012 is designed to support the C++ 11 Standard, and therefore should support the thread_local keyword. However, in my case, it doesn't seem to be supporting thread_local at all.
thread_local int number;
Error - this declaration has no storage class or type specifier
In the meantime, I simply using the __declspec keyword.