The OP seems to be discussing the problem of solving it in a global sense, so that people do not become homeless. IMO, more housing is the solution to that problem.
The GP seems to be discussing the problem of solving it in terms of the existing homeless population, which, regardless of causation or the directionality of any causation, does require dealing with the mental illness and drug abuse issues.
IMO, it's not, because people don't become homeless (for the most part) because there are no existing vacant housing units, they become homeless because of joblessness, poor credit, drug addiction, mental illness, and criminal issues (often involving drugs), or a combination thereof, which make them unable (financially or otherwise) to either rent housing in the open market or take advantage of publicly operated or subsidized housing.
> ... which make them unable (financially or otherwise) to either rent housing in the open market or take advantage of publicly operated or subsidized housing.
This is made easier when there is more housing available.
Physical illness and drug addiction (and even mental illness in some cases) are more likely a symptom of homelessness than a cause.
From accounts I've heard from homeless people, one of the biggest problems homeless people have is boredom. This leads to both depression and drug use, both of which can lead to both physical and mental illness.