Measurements of the cross sections for formation of compound nuclei in heavy-ion reactions