In this paper, output tracking control of four-body systems with flexible links is considered, where only the first and last bodies are with actuators. The systems are mathematically modelled based on the Newton's second law, which is described as an interconnected system with two subsystems. Due to the mechanical wear and changes of the external environment, it is necessary to consider uncertainties in the systems which are assumed to be bounded by known functions. Based on sliding mode techniques, a decentralized control scheme is proposed such that the outputs of the controlled systems can track the desired signals uniformly ultimately. Using specific coordinate transformations, the considered systems are transformed to a new system with a special structure to facilitate the design of sliding surfaces and sliding mode controllers. A set of conditions is developed under which the designed decentralized controller drives the tracking errors onto the sliding surface and stay on the surface thereafter while the system states are bounded. For simulation purposes, the desired signals are selected as part of a hyperbolic function which is time-varying and in consistence with the real situations. Simulation demonstrates that the proposed control strategy is effective and feasible.