OK I finally got it. It turns out that the problem was that my program is written using the libc++ libraries whereas the Wt library was built using the older libstdc++.
To fix this, I recompiled boost and Wt using libc++ instead by changing their CMakeLists.txt file, adding the line set(CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++")
. This produced a tonne of warnings, but seemed to work.
After installing these new builds, I made sure that Xcode had -L/usr/local/lib -I/usr/local/include
in its Other C++ Flags options and /usr/local/include
& /usr/local/lib
in 'Header Search Paths' and 'Library Search Paths' respectively. Then, I added the libraries into the "Link Binaries with Library" section. This solved my problem.