\documentclass{article}

\begin{document}

This is an undefined reference: \ref{sec:DoesNotExist}.

\end{document}
