There is a difficulty with finding anti-derivatives akin to the problem of defining the
inverse
to a function that takes on some of its values at more than one argument each. Knowing that the original function attains one of those values does not determine the inverse function; additional information in the form of an additional condition is necessary to distinguish among the more than one possible original arguments that could be called the inverse function under such circumstances.

In going from the derivative to the function we must contend with the fact that a constant has zero derivative: thus we can add any constant to any possible anti-derivative and get another equally valid one.

Which is really to say that to determine an anti-derivative completely you must add additional information. In particular the value of the function at any one argument will be enough to determine it from its derivative over its domain.

Thus we must recognize the fact that without an additional condition on
$f$
, there is no one single anti-derivative
$f$
for given
$g$
; we can find an anti-derivative, or describe all anti-derivatives (in which case you should add
$+c$
to any one anti-derivative) but it is not quite right to use the terminology "the anti-derivative of
$g$
" until an additional condition has been specified.

(I recall that when I studied calculus in ancient times we had to play a game reminiscent of "Simon Says" with
$+c$
; if the question at hand was phrased one way the answer had to have a
$+c$
; otherwise not. As I recall from even longer ago, it is very easy to distract a person to lose at Simon Says and it is equally easy to forget to write
$+c$
when it is called for.)