about static lib of boost::regex

Hi there,
I am writing a DLL under Windows with MSVC 2005. In my project,
boost:regex is involved. I do nothing but include the following in my
stdafx.h
#include

llwaeva@21cn.com wrote:
Hi there, I am writing a DLL under Windows with MSVC 2005. In my project, boost:regex is involved. I do nothing but include the following in my stdafx.h
#include
#include #include #include #include #include #include #include #include #include #include #include #include <fstream> #include <sstream> #include <string> #include <vector> it is all right to complie the project once I specify the path of the library of boost::regex. I found there are librarys in the directory libboost_regex-vc80-mt-s-1_33_1.lib and libboost_regex-vc80-mt-s.lib
I wonder what's different between these two librarys? Which one should I used to develope a DLL?
One links to the dll regex build and one to the static regex lib. Which you use depends on how your dll is to be used: if all uses of Boost.Regex are internal to the dll then you can just use the static lib (the default option). If Boost.Regex usage escapes from the dll (either it's used elsewhere in the application or Boost.Regex types appear in the dll's API's), then use the dll version of regex. To do that you will need to define BOOST_REGEX_DYN_LINK before including boost/regex.hpp and the auto-linking code will then pick up on the dll import lib and do everything for you. John.
participants (2)
-
John Maddock
-
llwaeva@21cn.com