Direct measurements of molecular attraction of solids