Gauss-Bonnet-Chern theorem Good morning/day/evening/night,
I was presented to the generalized Gauss-Bonnet-Chern theorem for hypersurfaces in Euclidean space;
For a closed, even dimensional manifold $M$ with dimension $n$ embedded in $\mathbb{R}^{n+1}$ we have
$$\int_M K\mathbb dV = \text{Volume }\mathbb{S}^n\cdot\frac{\chi(M)}{2}.$$
I wonder, 


*

*How does this theorem look for compact manifolds with boundary?

*Can this theorem be generalized to hold for closed odd dimensional manifolds? (I assume there will be a problem here since the Euler characteristic vanishes.)


Both questions are for hypersurfaces in Euclidean space.
Any reference will be greatly appreciated. 

The Gauss Bonnet Chern theorem is a special case of the Atiyah-Singer Index theorem, applied to calculated to the index of $d + d^*$ on differential forms, considered as mapping from even-degree forms to odd degree forms, which is exactly the Euler characteristic.
For a general (oriented) closed manifold, this comes down to
$$ \chi(M) = \int_M \mathrm{Eul}(TM),$$
that is, the Euler Characteristic is the integral over the Euler class of the tangent bundle of the manifold, which can be locally computed in terms of curvature. In two dimensions, the Euler class is just a multiple of the Gauss curvature times the volume form.
This holds for odd-dimensional manifolds as well (and simply states that the Euler genus is zero), and the orientability can be discussed away by either going to the oriented double cover of $M$ or by noticing that the integrand is still a well-defined volume density on $M$ even though it is not a proper differential form.
For the case with boundary, the formula is similar, but involves another curvature term, which is integrated over the boundary of $M$. See here, Thm. 1 for example. In the two-dimensional case (i.e. one-dimensional boundary), this integrand is the geodesic curvature of the boundary.
