
Metasebia Moges wrote:
Hi All,
I wanted to use boost::regex in a DLL whose methods are called a number of times by the main program. The code I wrote in the DLL compiles and builds without any problem. The code in the DLL seems to do the job the first time the DLL is called by the main program but the next time the DLL is called to do the same job again in the same run of the program, it halts.
When I do the same piece of job using the standard C++ libraries somehow, everything works fine but not with boost regex. Why? I am not sure if there is any #define or something I missed when boost regex is used in a DLL. Just confused .... FYI: I use Visual C++ 2003.
You can use Boost.Regex in a dll by defining BOOST_REGEX_DYN_LINK when building your dll, but as long as the regex code is isolated to your dll and doesn't spill over into it's public interface then this shouldn't be necessary. Other than that it's hard to say what the issue might be without seeing your code. John.