Chern number on non-spin manifold

The Enriques algebraic surface has even intersection form (i.e. for any class $\beta \in H^{2}(M,\mathbb{Z})$, $\int_{M^{4}} \beta^2$ is even) but is not spin by Rokhlin's theorem since the signature of the intersection form is $8$.

A simply connected $4$-manifold is spin $\iff$ the intersection form is even (which doesn't apply to the Enriques surface which has $\pi_{1} = \mathbb{Z}_{2}$).


EDIT: This does not work, in general, as explained by Michael Albanese's comment. Thanks!

If $M$ is not spin, then $w_2(M) \neq 0$. But $w_2$ agrees with $v_2$, the second Wu class, which measures whether the intersection form of $M$ is even or odd. Thus, we can find an element $\alpha \in H^2(M;\mathbb Z)$ such that $\alpha^2$ is an odd number times the cohomological fundamental class of $M$. Now represent $\alpha$ by a map $M \to K(\mathbb Z;2) = BU(1)$, i.e., a complex line bundle $E$ on $M$, then $c_1(E) = \alpha$ is as desired.