There is an answer in the case of constructible sheaves. The whole story can be found in Kashiwara and Shapira's book "Sheaves on Manifolds" Chapters VIII and IX.

I will try to summarize this rather long story. First, a prototype for a constructible sheaf is a locally constant sheaf supported on a *reasonable set*, e.g., semialgebraic, or subanalytic subset of some Euclidean space $\newcommand{\bR}{\mathbb{R}}$ $\bR^n$. For example the constant sheaf with stalk $\bR$ defined on a compact reasonable set is constructible. The Euler characteristic of the cohomology of this sheaf is the Euler characteristic of that set.

In general, a constructible sheaf is really a complex of sheaves whose associated cohomology sheaves are locally constant.

We can form a $K$-theoretic group $K(\bR^n)$out of these constructible sheaves very much the way Grothendieck for coherent sheaves on algebraic manifolds. If $A, B,C$ are constructible complexes of sheaves, then we have a $K$-theoretic equality $B=A+C$ if there exists a short exact sequence of complexes $0\to A\to B\to C\to 0$ (It is a bit more complicated than this but I want to avoid talking about triangulated categories.) The Euler characteristic of the (hyper)cohomology of a complex $A$ induces a group morphism

$$\chi: K(\bR^n)\to \mathbb{Z}.$$

Kashiwara and Schapira have shown that the Abelian group $K(\bR^n)$ is isomorphic to two groups that have simpler descriptions.

The first group is the group $\newcommand{\eC}{\mathscr{C}}$ $\eC(\bR^n)$ of constructible functions. These are functions $f:\bR^n\to \mathbb{Z}$ with *finite* range such that, for any $t\in\bR$ $f^{-1}(t)$ is a subanalytic set. We obtain an Euler characteristic morphism

$$\chi:\eC(\bR^n)\to\mathbb{Z}, $$

defined by

$$\chi (f) =\sum_{n\in\mathbb{Z}} n \chi\bigl(\;f^{-1}(n)\;\bigr). $$

The second group is the group $\newcommand{\eL}{\mathscr{L}}$ $\eL(\bR^n)$ of conical lagrangian cycles in $T^*\bR^n$. These are cycles supported by lagrangian varieties in $T^*\bR^n$ which are invariant under the rescaling along the fibers of the cotangent bundle.

Joseph Fu has given a very nice geometric description of an isomorphism $\eC(\bR^n)\to \eL(\bR^n)$. This isomorphism associates to each constructible $f$ function a lagrangian cycle called the conormal cycle $C^f$ of the constructible function $f$. For example, if $f$ is the indicator function of a compact, subanalytic submanifold $S\subset \bR^n$, then $C^f$ is the Lagrangian cycle defined by the conormal bundle of $S$ which is a subbundle of $T^*\bR^n|_S$.

The *normal cycle* $N^f$ of a constructible function $f$ is obtained by intersecting the conormal cycle $C^f$ with the unit sphere bundle of $T^*\bR^n$. Thus, if $f$ is the indicator function of a compact, subanalytic submanifold $S\subset \bR^n$, then the normal cycle $N^f=N^S$ can be identified with the unit normal sphere bundle of the submanifold $S$. If $f$ is the characteristic function of a compact domain $D$ with smooth boundary $\newcommand{\pa}{\partial}$ $\pa D$ then the normal cycle is the graph of the Gauss map

$$ n:\pa D \to S^{n-1}\subset \bR^n,\;\;p\mapsto n(p), $$

where $n(p)$ denotes the outer unit normal vector to $\pa D$ at $p$.$\newcommand{\bZ}{\mathbb{Z}}$

The Euler characteristic morphism $\chi: \eL(\bR^n)\to\bZ$ was given an explicit description by Fu. More precisely there exists a universal form of degree $n-1$, $\omega\in \Omega^{n-1}(S^{n-1}\times \bR^n)$ such that, for any constructible function $f$, its Euler characteristic $\chi(f)$ is equal to the integral of $\omega$ over the normal cycle $N^f$ which is naturally a cycle in $S^{n-1}\times \bR^n$. When $f$ is the indicator function of a submanifold, the above result is none other that the usual Gauss-Bonnet. When $f$ is the indicator function of a compact affine simplicial complex in $\bR^n$, Fu's result leads to the computation of the Euler characteristic of the complex as an integral of a so called *curvature measure*. You can learn more about this at Fu's homepage.

7more comments