# IEEEtran: \ref works but \cref does not [duplicate]

So I am using the IEEEtran document class for the first time and I have a problem. When I cross-reference a figure/table/section/whatever with \ref I get the expected reference number. But I would like to automatically insert the associated prefix -- Figure, Section, whatever -- which can be done with the package cleveref. However, when I use the \cref command, I get the output ?? in the pdf document.

My preamble is like this

\documentclass[conference]{IEEEtran}
\IEEEoverridecommandlockouts
% The preceding line is only needed to identify funding in the first
% footnote. If that is unneeded, please comment it out.

\usepackage{amsmath,amssymb,amsfonts}
\usepackage{algorithmic}
\usepackage{graphicx}
\usepackage{textcomp}

\usepackage{hyperref}


One of my figures is defined like this:

\begin{figure}[h]
\centering
\includegraphics[scale=.5]{graphs/full_vector_gen_8.eps}
\caption{Experiment results for the Full Vector algorithm with generation size 8.}
\label{fig:res-fv-gen-8}
\end{figure}


And the \cref command is \cref{fig:res-fv-gen-8} for instance. None of my \cref commands work.

EDIT: Noticed that I get this warning: LaTeX Warning: Reference 'fig:res-fv-gen-8' on page 1 undefined on input line 3.

• cleveref must always be loaded after hyperref. No exceptions. – Mico Feb 6 '18 at 21:22
• Thank you so much @Mico and yes it is a duplicate then. I thought it was a problem with IEEETran and thanks for the edit :) – Lars Nielsen Feb 6 '18 at 21:38