# Does a continuous function have a continuous integral function in a discrete dynamical system?

Let $X$ be a compact manifold (or the closure of a Euclidean domain if that helps significantly) and $T\colon X\to X$ a homeomorphism. Let us say that a function $v\colon X\to\mathbb R$ is the integral function of $w\colon X\to\mathbb R$ if $w(x)=v(T(x))-v(x)$ for all $x\in X$. It is clear that a function has an integral function if and only if it sums to zero over all periodic orbits of $T$. By this summing to zero I mean that if $T^n(x)=x$, then $\sum_{k=1}^nw(T^k(x))=0$. The integral function is unique up to constants that can be chosen independently for each trajectory of $T$.

If a continuous function $w$ has an integral function, does it also have a continuous integral function? That is, can the constants for different trajectories chosen in such a consistent way as to make the integral function continuous? I assume the answer depends on the properties of the dynamical system given by $T$, but I have not found a proof (under any additional assumptions) or a counterexample.