Solution (source code)

= Solution

The <Dolbeault theorem> identifies $H^2(M,\mathcal O_M)$ with $H^{0,2}_{\bar\partial}(M)$. It vanishes by hypothesis, and <complex conjugation> in the <Hodge decomposition theorem for compact Kähler manifolds> makes $H^{2,0}$ vanish too. Thus every real degree-two cohomology class has type $(1,1)$.

Let $\omega$ be a Kähler form. Choose a rational cohomology class $\eta$ sufficiently close to $[\omega]$. More concretely, using <harmonic differential forms> as representatives for a fixed <Kähler metric>, the harmonic form representing $\eta$ is close to $\omega$ in every smooth norm: <harmonic differential forms> constitute a <finite-dimensional vector space>. It is a real closed $(1,1)$ form, and is positive if sufficiently close to $\omega$, by <compactness>. This is the openness of the <Kähler cone>. Multiplying by a positive integer gives an integral Kähler class $\kappa=N\eta$.

The <holomorphic exponential sequence> contains the cohomology segment
$$
H^1(M,\mathcal O_M^*)\xrightarrow{c_1}H^2(M,\mathbb Z)\longrightarrow H^2(M,\mathcal O_M)=0.
$$
Choose an integral lift of $\kappa$. Exactness gives a <holomorphic line bundle> $\mathcal L$ having that <First Chern class>. We must ensure that it has a positive metric, rather than merely a positive representative of its class.

Choose any <Hermitian metric> $h_0$ and let $\theta_0$ be its <normalized curvature form of a Hermitian holomorphic line bundle>. If $\theta$ is the positive form representing $\kappa$, then $\theta-\theta_0$ is an exact real $(1,1)$ form. The <ddbar lemma> gives a real smooth function $u$ with
$$
\theta-\theta_0=\frac{i}{2\pi}\partial\bar\partial u.
$$
Replace $h_0$ by $h=e^{-u}h_0$. Its normalized curvature is $\theta$, so $\mathcal L$ is a <positive holomorphic line bundle>. The <Kodaira embedding theorem> now applies: sufficiently many sections of a sufficiently high <tensor power> define the desired embedding. Therefore
$$
\boxed{H^2(M,\mathcal O_M)=0\ \Longrightarrow\ M\text{ admits a holomorphic embedding into complex projective space}.}
$$