  The fragmentation functions for $c$ or $\bar{b}$ quark to $B_c$ or $B_c^*$
meson are derived up to QCD next-to-leading order (NLO). They are further
computed numerically and presented in figures precisely. In order to reach a
higher accuracy, we have also tried properly to apply them to estimating the
$B_c$ and $B_c^*$ production at a $Z$-factory (an $e^+e^-$ collider running at
the energy of the $Z$-boson pole).
