This paper is concerned with a comparison of two methods of treating solid wall boundaries in the weakly compressible (SPH) method. They have been chosen because of their wide use in simulations. These methods are the boundary force particles of Monaghan and Kajtar  and the use of layers of fixed boundary particles. The latter was first introduced by Morris et al.  but has since been improved by Adami et al.  whose algorithm involves interpolating the pressure and velocity from the actual fluid to the boundary particles. For each method, we study the effect of the density diffusive terms proposed by Molteni and Colagrossi  and modified by Antuono et al. . We test the methods by a series of simulations commencing with the time-dependent spin-down of fluid within a cylinder and the behaviour of fluid in a box subjected to constant acceleration at an angle to the walls of the box, and concluding with a dam break over a triangular obstacle. In the first two cases the results from the two methods can be compared to analytical solutions while, in the latter case, they can be compared with experiments and other methods. These results show that the method of Adami et al. together with density diffusion is in very satisfactory agreement with the experimental results and is, overall, the best of the methods discussed here.