I wanted to add one thing to this very useful thread, if only to have a record of it somewhere:
For the curious:
Wondering how the library can still compile with some includes missing?
(I believe, perhaps someone can confirm...)
If you inspect some of the .cpps under wxcore/src/cpp/ you'll find they do a bunch of ifdefs (for example ifdef wxUSE_MEDIACTRL).
Where do these defines come from?
Well in Setup.hs you'll find this:
> (readProcess "wx-config" ["--libs", "--cppflags"] "")
And that "cppflags" flag will print out (or in our case, on Linux, not print out) things like (wxUSE_MEDIACTRL), these are passed to "ccOptions" (from Distribution.InstalledPackageInfo), and the build system then passes these to the CPP linker.