I am using Boost.Regex in my VC2011 project and the latest Boost.Regex was compiled to a static and dynamic library.
I’ve forced my VC project to link the static library (boost_regex-vc110-mt-1_49.lib), but after the project was compiled and when it is run, it reports that:
missing boost_regex-vc110-mt-1_49.dll
I googled the similar problem and someone suggests to use /D "BOOST_ALL_NO_LIB", I tried this, but it doesn’t help.
If you define
BOOST_ALL_NO_LIBthen you’ll have to specify all your Boost dependencies manually. So, if you want everything to be linked statically, then defineBOOST_ALL_NO_LIBand link everything manually. Otherwise, if it’s just threads, useBOOST_REGEX_NO_LIBand simply linkBoost.Regexmanually.