This paper introduces a new approach for the design of planar six-bar mechanisms for the purpose of function generation. The structural error is formulated using the input-output relationship of such a mechanism. In addition to the conventional structural error, its derivative is minimised via numerical optimisation, leading to the novel concept of dual-order structural error, which lends itself naturally to a multi-objective formulation of the design problem. Furthermore, analytical conditions for the mobility of the mechanism are derived for two cases: mobility for the full cycle of the crank, and for any given subset of it, along with the identification of the kinematic branches. These conditions help confine the numerical search for the optimal designs to the feasible regions of the design space, leading to a very efficient computational scheme. The results obtained are better in accuracy as compared to the reported results in existing literature. The formulation and results are demonstrated in the context of the Watt-II and the Stephenson-III mechanisms. © 2017 Elsevier Ltd