Whenever I try and label an equation in the following format
\begin{equation}\label{eq:blah}
blah
\end{equation}
and then reference this equation
By \eqref{eq:blah}
I get the usual (??) of an ill-defined labeling. It only happens with equation environments though.
I've tried removing almost everything I can think of in my preamble to make it work, but to no avail.
Consequently, I am posting a MWE which is not very minimal—apologies!
Any help is greatly appreciated!
\documentclass{book}
\usepackage{amsfonts,amssymb,latexsym,verbatim,url,color,mathrsfs,tikz,extarrows,enumerate,lipsum,mathtools}
\usepackage[nameinlink]{cleveref}
\usepackage{enumerate,fancyhdr,verbatim,comment}
\usepackage{dsfont}
\usetikzlibrary{matrix,arrows}
\usepackage[colorlinks = true,
linkcolor = blue,
urlcolor = blue,
citecolor = blue,
anchorcolor = blue]{hyperref}
\usepackage[amsmath,thmmarks]{ntheorem}
\newcounter{dummy}
\numberwithin{dummy}{chapter}
\theoremprework{\setlength
\theorempreskipamount{10 pt}\setlength\theorempostskipamount{10 pt}}
\theoremstyle{plain}
\theorembodyfont{\upshape}
\theoremsymbol{}
\theoremseparator{:}
\newtheorem{example}[dummy]{Example}
\begin{document}
\begin{equation}\label{eq:example}
\int_a^b f(x)\, dx=F(b)-F(a)
\end{equation}
By Equation \eqref{eq:example}
\end{document}
New MWE:
\documentclass{book}
\usepackage{amsfonts,amsmath,amssymb,latexsym,verbatim,url,color,mathrsfs,tikz,extarrows,enumerate,lipsum,mathtools}
\usepackage{enumerate,fancyhdr,verbatim,comment}
\usepackage{dsfont}
\usepackage[margin=1 in]{geometry}
\usetikzlibrary{matrix,arrows}
\usepackage[amsmath,thmmarks]{ntheorem}
\usepackage[colorlinks = true,
linkcolor = blue,
urlcolor = blue,
citecolor = blue,
anchorcolor = blue]{hyperref}
\usepackage[nameinlink]{cleveref}
\newcounter{dummy}
\numberwithin{dummy}{chapter}
\theoremprework{\setlength
\theorempreskipamount{10 pt}\setlength\theorempostskipamount{10 pt}}
\theoremstyle{plain}
\theorembodyfont{\upshape}
\theoremsymbol{}
\theoremseparator{:}
\newtheorem{example}[dummy]{Example}
\begin{document}
\begin{equation}\label{eq:example}
\int_a^b f(x)\, dx=F(b)-F(a)
\end{equation}
By Equation \eqref{eq:example}
\end{document}

hyperrefexceptcleverefwhich must be last. – egreg Nov 30 '15 at 07:47amsmathoption tothmtools. – Andrew Swann Nov 30 '15 at 09:04extarrowsandcomment. Both are not connected to the problem which you indicate in the question title. – Zarko Nov 30 '15 at 10:32amsmathoption, your second doesn't – Andrew Swann Nov 30 '15 at 11:03amsthm, but the one you need isamsmath. – Andrew Swann Nov 30 '15 at 11:10ntheoremafterhyperref(it should go before it) andcleverefbeforehyperref(it should go after it). – egreg Dec 30 '15 at 14:21