1

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.

Rafał Rawicki
  • 22,324
  • 5
  • 59
  • 79
user1285419
  • 2,183
  • 7
  • 48
  • 70
  • Did you perform a complete rebuild (clean and then build)? – hmjd Mar 24 '12 at 07:44
  • yes, I did. But it doesn't help the program. But I notice one thing, since I use the boost::random too, once I link manually the static lib (boost_random-vc110-mt-1_49.lib) into the project, it doesn't ask me for the dll while running. – user1285419 Mar 24 '12 at 07:50

1 Answers1

0

If you define BOOST_ALL_NO_LIB then you'll have to specify all your Boost dependencies manually. So, if you want everything to be linked statically, then define BOOST_ALL_NO_LIB and link everything manually. Otherwise, if it's just threads, use BOOST_REGEX_NO_LIB and simply link Boost.Regex manually.

Anthony
  • 12,177
  • 9
  • 69
  • 105