Boost logo

Boost :

From: Bob Kline (bkline_at_[hidden])
Date: 2002-09-20 07:21:49


We're getting a new warning when compiling our code against Regex++ 3.31
using Visual C++ 7. Here is the text of the warning, reformatted
slightly to make it easier to read:

F:/usr\regex\boost\regex\pattern_except.hpp(35) : warning C4275: \
  non dll-interface class 'std::runtime_error' used as base for \
  dll-interface class 'boost::bad_pattern'
       D:\Program Files\Microsoft Visual Studio \
  .NET\Vc7\include\stdexcept(137) : see declaration of \
  'std::runtime_error'
       F:/usr\regex\boost\regex\pattern_except.hpp(34) : see \
  declaration of 'boost::bad_pattern'

Our code is compiled using /MD (or /MDd). If we invoke the compiler
with /ML the warning goes away. If we add -DBOOST_REGEX_STATIC_LINK=1
the warning goes away (the Regex++ docs say "If you would prefer to do a
static link to the regex libraries even when using the dll runtime then
define BOOST_REGEX_STATIC_LINK ...."). Is there something about the
interaction between the Regex++ package and VC7 which makes it desirable
or necessary to link to the regex libraries statically? Or is this a
warning which can safely be suppressed? What are its possible
implications?

I did browse back through the message headers in the mailing list
archives (and did some Google searching) to see if these questions have
already been address. I apologize if it's there and I didn't go back
far enough.

Also, is there more substantial documentation of the automatic linking
performed than what I found in the "Installation and Configuration"
documentation ("It is not necessary for you to manually add a .lib file
to the project; the headers will automatically select the correct .lib
file for your build mode and tell the linker to include it")?

Finally, is there a newsgroup interface to the mailing list?

Thanks very much!

-- 
Bob Kline
mailto:bkline_at_[hidden]
http://www.rksystems.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk