Label with counter

I have a counter called Sols. I want to create a label as follows:

\label{Sol:\arabic{Sols}}


From some reason I get errors. What is the solution to that?

Thank you!

• Can you provide some more context here? What is the error, for example? Perhaps also include your .log. – Werner Sep 16 at 16:33
• It should normally work, unless something is redefining \arabic or some of its internals (if I recall correctly, some babel language does that). Please provide us a compilable example that shows the problem. – Phelype Oleinik Sep 16 at 16:33

This works:

\documentclass{article}
\newcounter{foo}
\setcounter{foo}{7}
\begin{document}
\section{Baz}
\null\newpage
bar\label{baz\thefoo}
\newpage
On page~\pageref{baz7} or in section~\ref{baz7}

\end{document}