Boost logo

Boost Users :

Subject: Re: [Boost-users] [interprocess] warning C4251: need dll-interface
From: Peter Bartlett (pete_at_[hidden])
Date: 2009-04-09 07:46:01


> On Wed, Apr 8, 2009 at 11:28 PM, Brent Arias
> <Brent.Arias_at_[hidden]> wrote:
>> I've defined a class to use within shared memory, and I've
>> decorated it with a Windows _declspec(export) to expose it from a
>> DLL.  When I compiled with VC 2008, I got this warning:
>>
>> Warning C4251: class 'boost::interprocess::vector<T,A>' needs to
>> have dll-interface to be used by clients of 'MyClass'

There is an explanation of this problem at
http://www.unknownroad.com/rtfm/VisualStudio/warningC4251.html.

The short version is that it is nearly always ok to ignore the warning
but there is real underlying risk of strange errors if you link
libraries compiled with different compilers or compiler options.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net