In this paper we consider equations of an isentropic viscous gas when the Reynolds number is large. In a three-dimensional domain with an arbitrary smooth boundary we construct an asymptotic solution of boundary layer type to any accuracy with respect to the parameter h∼1/√Re≪1. In particular, we derive rigorously the Prandtl equations describing the leading term of this asymptotic solution. A system of Lin-Lees equations is obtained in this paper without any assumption on parallelism of the outer flow, and it is proved that in general position this system can be reduced to an equation similar to the Orr-Sommerfeld equation. This equation is more complicated than the equation of incompressible fluid; however, it is essentially easier than the Lin-Lees equations. We restrict our consideration by a boundary layer situation. Some similar ideas allow one also to construct a rapidly oscillating asymptotic solution of fluid and gas motion equations.