Solution to the linear quadratic control problem is given in the class of linear dynamic output-feedback full order controllers. Necessary and sufficient conditions for existence of such an optimal controller are stated in terms of linear matrix inequalities provided that initial conditions for controller states to be zero. It is shown that parameters of the optimal controller depend on an initial plant state. As an alternative we introduce γ-optimal controller which minimizes the maximal ratio of the performance index and square of the norm of the initial plant state. Numerical comparison for two kinds of these controllers is presented for inverted and double inverted pendulums.