Before exposing my question, I'd like to advise that I'm *not* a geometer. So, please, be explicit as much as possible. I first exposed this problem in math.stackexchange, but I didn't get any answer, so maybe this is the right place.

Given a divisor $D$ on a plane complex projective curve $X$, there is a nice way to build a line bundle, $[D]$, which first Chern class is almost $D$ : it's just the Poincaré dual of $D$ when understood as homology class. (This is a much more general fact.)

For example, if I take the canonical bundle $K_X$ of $X$, then $$K_X = c_1(T^*X) = -c_1(X).$$

And now there is two ways to compute $l(K_X)$, the dimension of the linear system of $K_X$. On one hand, we can do some explicit computation (classical algebraic geometry). On the other hand, if I admit that $l(K_X)$ is the genus of $X$, $g(X)$, then since : $$\langle c_1(X),[X]\rangle = \chi(X) = 2-2g(X)$$ we get $$ l(K_X) = \frac {\langle K_X,[X]\rangle}2 - 1.$$

My question is the following :

Is there such a way to compute $l(D)$ for a general divisor $D$ and complex algebraic manifold $X$ (put here the assumptions you want), i.e. in terms of the topology of the line bundle associated ?

(I know we can tell that $l(D) = h^0(X,\mathcal O(D)) -1$. But this is not very explicit and useful for computations, is It ?.)

Thanks for your time/help