OpenCV merge() doesn't link-Collection of common programming errors

I’m getting the following link error in my OpenCV program (using Mac OS, Xcode):

Undefined symbols for architecture x86_64:
“cv::merge(std::vector > const&, cv::_OutputArray const&)”, referenced from:

My first reaction is that I’ve failed to link the correct library containing the merge() function. OpenCV documentation doesn’t really tell you what library files things are in. But I’ve tried adding every single library in my lib directory to the project, and I still get the same message. What else can cause this?

Originally posted 2013-11-06 03:08:31.