In Friedrich's book "Dirac operators in Riemannian geometry" there is this definition for spin structure.
Let $X$ be a CW-complex and $(Q, \pi, X, SO(n))$ a $SO(n)$-principal bundle on $X$. A spin structure on $Q$ is a pair $(P, \Lambda)$ such that
- $P$ is a $Spin(n)$ principal bundle on X,
- $\Lambda: P \rightarrow Q$ is a 2-fold covering for which the following diagram commutes
$\require{AMScd}$ \begin{CD} P \times Spin(n) @>>> P\\ @VVV @VVV\\ Q \times SO(n) @>>> Q \end{CD}
where $\Lambda \times \lambda : P \times Spin(n) \rightarrow Q \times SO(n)$ and $\lambda: Spin(n) \rightarrow SO(n)$ is the standard covering map.
But everywhere else I find a different definition of spin structure, starting from an oriented vector bundle $E \rightarrow X$ and defining a spin structure on the frame bundle $P_{SO}(E)$ with the same properties described above.
Are these two definitions equivalent? I think yes, since to a $SO(n)$-principal bundle I can associate an oriented vector bundle, but I'm not sure if I'm missing something. Also why do we want X to be a CW-complex?