On page 5 of: Probabilistic Number Theory by Dr.J¨orn Steuding, there's
$\sum_{n=2}^{[x]} \frac{1}{n} \lt \int_{1}^{[x]} \frac{dt}{t} \lt \sum_{n=1}^{[x] - 1}$ Therefore integration yields: $\sum_{n \leq x} \frac{1}{n} = \int_{1}^x \frac{dt}{t} + O(1)$
I'm not sure how they arrived at that conclusion.
I there there is quite a bit missing to make that a rigorous argument. It isn't hard to reconstruct one though.
From the inequality
$$\sum_{n=2}^{[x]} \frac{1}{n} \lt \int_{1}^{[x]} \frac{dt}{t} \lt \sum_{n=1}^{[x] - 1} \frac{1}{n}$$
we would like to extract an upper and lower bound for $$\sum_{n=1}^{[x]} \frac{1}{n}$$ so take the inequality at $[x]+1$ to deduce $$\int_{1}^{[x]+1} \frac{dt}{t} \lt \sum_{n=1}^{[x]} \frac{1}{n}$$ in fact we might weaken this to $$\int_{1}^{[x]} \frac{dt}{t} \lt \sum_{n=1}^{[x]} \frac{1}{n}$$ and add one to both sides of the original inequality to deduce $$1 + \sum_{n=2}^{[x]} \frac{1}{n} = \sum_{n=1}^{[x]} \frac{1}{n} \lt 1 + \int_{1}^{[x]} \frac{dt}{t}.$$
Hence $$\int_{1}^{[x]} \frac{dt}{t} \lt \sum_{n=1}^{[x]} \frac{1}{n} \lt 1 + \int_{1}^{[x]} \frac{dt}{t}$$
from this it is clear that the sum is equal to $\int_{1}^{[x]} \frac{dt}{t}$ some constant ($O(1)$).