It's impossible to say why the results are different in this case without more information. For example:
* Where did you install wxWidgets?
* How did you modify PATH? Did you modify any other env vars?
* How did you install Cabal and GHC?
* How are you setting env vars? Are you sure Stack is seeing the same values as cabal?
* Are you using the same versions of libraries and compilers with Stack and Cabal?
* What error message are you seeing?
I can't say that I've personally installed wxWidgets recently (on any OS actually), so I don't have personal experience to back it up. But with other libraries (like libicu), I've found that the easiest thing with Stack is to use msys2 and pacman to install the system libraries. As an example, see this tweet[1].