Let $e(-)$ denote ordinary Euler characteristic and $\chi_c(-)$ the compactly supported version.

Complex varieties admit Whitney stratifications. In particular, each closed stratum in such a stratification is a strong deformation retract of a tubular neighborhood. It follows (Mayer-Vietoris) that if $Y\subseteq X$ is such a closed strata, then $e(X) = e(Y) + e(X-Y)$.

Now, if $X = \bigsqcup_i X_i$ is a Whitney stratification with each $X_i$ smooth, then by Poincare duality, $e(X_i) = \chi_c(X_i)$ for each $i$. Let $Y$ be a stratum of minimal dimension. So $Y$ is closed. By induction on the number of strata we may assume $e(X-Y) = \chi_c(X-Y)$. Now use the observation of the previous paragraph and you are done.