Suppose I have fileA.h which declares a class classA with template function SomeFunc. This function is implemented directly
It is an error to have a specialization for a template which is not visible at the point of call. Unfortunately, compilers are not required to diagnose this error, and can then do what they like with your code (in standardese it is "ill formed, no diagnostic required").
Technically, you need to define the specialization in the header file, but just about every compiler will handle this as you might expect: this is fixed in C++11 with the new "extern template" facility:
extern template<> SomeFunc();
This explicitly declares that the particular specialization is defined elsewhere. Many compilers support this already, some with and some without the extern.