Let $G$ a primitive of $g$, which exist since $g$ is continuous. Let $\varphi$ a test-function. We have, if $T$ is a solution of $T'+gT=0$ that
\begin{align*}
\langle (e^GT)',\varphi\rangle_{\mathcal D'(\mathbb R),\mathcal D(\mathbb R)}
&=-\langle e^GT,\varphi'\rangle_{\mathcal D'(\mathbb R),\mathcal D(\mathbb R)}
\\\
&=-\langle T,e^G\varphi'\rangle_{\mathcal D'(\mathbb R),\mathcal D(\mathbb R)}\\\
&=-\langle T,(e^G\varphi)'-G'e^G\varphi\rangle_{\mathcal D'(\mathbb R),\mathcal D(\mathbb R)}\\\
&=-\langle T',e^G\varphi\rangle_{\mathcal D'(\mathbb R),\mathcal D(\mathbb R)}+
\langle T,ge^G \varphi\rangle_{\mathcal D'(\mathbb R),\mathcal D(\mathbb R)}\\\
&=\langle -gT,e^G\varphi\rangle_{\mathcal D'(\mathbb R),\mathcal D(\mathbb R)}+
\langle T,ge^G \varphi\rangle_{\mathcal D'(\mathbb R),\mathcal D(\mathbb R)}=0.
\end{align*}
Now we use the fact that if a distribution on $\mathbb R$ has a derivative equal to $0$, it can be represented by a constant function (see here for example). So $e^GT$ can be represented by the constant $C$ and so $T$ is also a strong solution of (E).