caption2 in now an obsolete package. Maybe the problem is that you are using an old version of caption. Please compile the following code (it compiles OK for me and the reference is also OK) and please post here (as an attachment) the .log file you get after compilation.
Code: Select all
\listfiles
\documentclass{article}
\usepackage{float}
\usepackage{caption}
\captionsetup{labelfont=bf,font=small}
\usepackage{lipsum}% just to automatically generate some text
\newfloat{Myfloat}{htbp}{myf}
\begin{document}
Just a test. As you see in \ref{myf:test1}...
\begin{Myfloat}
\centering
\fbox{text}
\caption{a simple example}
\label{myf:test1}
\end{Myfloat}
\end{document}