How constant returns to scale leads to zero economic profit? This was mentioned in my textbook Macroeconomics-Gregory Mankiw. 


  If the production function has the property of constant returns to scale, as is often thought to be the case, then economic profit must be zero. That is, nothing is left after the factors of production are paid.


It was mentioned that this comes out as a result of Euler's Theorem, but I don't quite understand it, can anyone please clarify this?
The argument is that if there are constant returns to scale then the marginal product of each factor of production is constant as total quantity changes. This makes the production function homogeneous in the first degree and it will look something like 
$$Q=\dfrac{\partial Q}{\partial A}A +\dfrac{\partial Q}{\partial B}B +\dfrac{\partial Q}{\partial C}C$$

Then if each factor of production is paid at a rate equal to its marginal product, the complete value of the production will be distributed to the factors of production, since 

$$PQ-\left(P\dfrac{\partial Q}{\partial A}A +P\dfrac{\partial Q}{\partial B}B +P\dfrac{\partial Q}{\partial C}C\right)=0$$

so there will be no economic rent or profit

The practical problem with this is that constant returns to scale is a very strong assumption.  The theoretical problem (at least for marginalist theories) is that there is no natural equilibrium for the level of production