You have a few options but all of them involve adding the library libboost_regex
to your project to resolve the link errors. Even though you installed boost using homebrew, you still need to add the library to your project because boost's regex code contains a compiled portion. If you don't add the library there is no way for the linker to resolve the symbols.
The first option is to add /usr/local/lib
to Library Search Paths, and add -lboost_regex
to Other Linker Flags. If you choose this option you may need to add /usr/local/lib
to Runpath Search Paths also. This method will link against the dynamic library in /usr/local/lib
.
If you want your program to be self-contained you can link against the static (.a
) version of boost_regex
. To do this add libboost_regex.a
to your project in Build Settings - Link Binary With Libraries.