Also changed wx-config --cppflags to --cxxflags. I am not sure what the difference is supposed to be, but --cppflags does not include -pthread.