Matt Dargavel wrote:
> It's taken me a while, but I've got round to getting the latest
> version out of svn and getting it to compile on Windows.
Don't be guilty about that. Any help is appreciated, and dropped balls
are stoically ignored. :)
> If you turn the warning level up to 3, you get a bunch of warnings
> similar to:
>
> ...\connection.h(570) : warning C4251:
> 'mysqlpp::Connection::pending_options_' : class 'std::deque<_Ty>' needs to
> have dll-interface to be used by clients of class 'mysqlpp::Connection'
It's not clear to me whether this bunch of warnings is all about
pending_options_, or if all members of that class (or others!) are also
being complained about. More data would help me to understand the
common source of the problem.
> See http://msdn2.microsoft.com/en-us/library/esew7y1w.aspx for
> warning details.
Unfortunately, there are four different cases where this warning appears.
The only thing common among them is that there seems to be some problem
with static data. Since pending_options_ isn't static itself and is
never accessed through inline methods, it would seem that the only thing
it can be complaining about is that deque has a static member. It seems
to me that it would be madness for that to be anything other than a
write-once, read-many variable, kept for optimization; a pointer to a
singleton, perhaps. Unless VC++'s STL has locks within it, you'd
completely wreck thread safety if it were otherwise, and that's one of
the (few) strengths of VC++. (Be nice, Warren.) (And stop talking to
yourself.)
If I've guessed right, it should be safe to ignore the warning. It'd be
nice to know for sure before doing that, however.