Cranes play a very important role in transporting heavy loads in various industries. However, because of its natural swinging characteristics, the control of crane needs to be considered carefully. This paper presents a control approach to a flexible cable crane system in consideration of both rope length varying and system constraints. At first, from Hamilton's extended principle the equations of motion that characterized coupled transverse-transverse motions with varying rope length of the gantry are obtained. The equations of motion consist of a system of partial differential equations. Then, a barrier Lyapunov function is used to derive the control located at the trolley end that can precisely position the gantry payload and minimize vibrations. The designed control is verified through extensive experimental studies.