Porting issues with boost::regex when going from CS6 to CC2014 using Xcode
I have a working project in CS6 that uses the boost::regex framework that I'm having problems porting into CC2014.
I ported this project by using Dolly to create a new project, then coping the old source files across, finally updating the various out dated InDesign API calls that appeared when I compiled. For the use of regular expressions I added the debug and release builds of the boost_regex.framework to the respective targets.
Now, for the debug build the new CC2014 projects builds happily. But when I switch to the release build I get a few linker errors. They are all something like:
Undefined symbols for architecture x86_64:
"boost::re_detail::get_mem_block()", referenced from:
boost::re_details::perl_matcher<__gnu_cxx::__normal_iterator<char const *, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const *, std::string> > >, boost::regex::regex_traits<char, boost::cpp_regex_traits<char> > >::find_imp() in SbRegex.o
etc.
I did a bit of reading through the boost header files. The odd thing is that the "get_mem_block()" appears to be defined for the pre-processor option BOOST_REGEX_NON_RECURSIVE, while in the project settings for BOOST_PREPROCESSOR_DEFINITIONS contains BOOST_REGEX_RECURSIVE. These two settings are mutually exclusive and there's pre-processor logic that blocks having both cases defined at once.
This recursive option is used to control how memory is used while processing a regular expression, so seeing a get_mem_block() call (other link errors involve a call to put_mem_block) sort of makes sense being calls that look like something to do with memory.
I'm trying to figure out why debug builds, but release build fails. Does this problem look familiar to anyone? Anyone have any suggestions to try to fix it?
