Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017 Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
<== Date ==> <== Thread ==>

Subject: Re: EPICS V4 Windows build warning messages.
From: Andrew Johnson <anj@aps.anl.gov>
To: "Mark S. Engbretson" <Engbretson@anl.gov>, <tech-talk@aps.anl.gov>
Date: Wed, 19 Apr 2017 14:57:41 -0500
Hi Mark,

On 04/19/2017 01:41 PM, Mark S. Engbretson wrote:
> If one builds Epics V 4 on a windows box with Visual Studio 2013
> Community, as either shared libraries or static, you get **hundreds** of
> warning messages that deal with <something> needing to have
> dll-interface to be used.
> 
> i.e.
> 
> warning C4251: 'epics::nt::NTEnum::URI' : class
> 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
> needs to have dll-interface to be used by clients of class
> 'epics::nt::NTEnum'
> 
> Does anyone know if this is actually an indication that things will most
> likely not work if, for example, one were to build AD2-6 with Epics V4
> support?

EPICS V4 built using MS Visual C++ works just fine, we do run the
standard self-tests on it before release.

This is a scary warning from Microsoft that is totally bogus. It's
suggesting that we need to modify classes inside the std:: namespace,
which of course we can't do (presumably MS could if it mattered since
they provide the definitions of their implementations of the C++ std
classes; they haven't applied the necessary decorations though, so
presumably it doesn't actually matter).

> Microsoft claims that the error is thrown when one is not separating the
> interface from the implementation. If clients should not be able to
> access these items, they should be made private and #pragma warning
> disable C4251 added to source. If they should be accessible, code added
> to access them.
> 
> I’m assuming the #pragma solution is a reasonable solution?

If you want to eliminate this particular warning completely you should
be able to do it in one place by adding this line to a suitable
CONFIG_SITE file:

  WARN_CXXFLAGS_YES += -w44251

Yes there are meant to be two '4' digits there. There is no need to
rebuild anything after making that change, all it does is suppress the
C4251 warning messages at build time; this compiler command-line option
is equivalent to the #pragma solution.

- Andrew

-- 
Arguing for surveillance because you have nothing to hide is no
different than making the claim, "I don't care about freedom of
speech because I have nothing to say." -- Edward Snowdon

References:
EPICS V4 Windows build warning messages. Mark S. Engbretson

Navigate by Date:
Prev: EPICS V4 Windows build warning messages. Mark S. Engbretson
Next: RE: EPICS V4 Windows build warning messages. Mark S. Engbretson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
Navigate by Thread:
Prev: EPICS V4 Windows build warning messages. Mark S. Engbretson
Next: RE: EPICS V4 Windows build warning messages. Mark S. Engbretson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
ANJ, 19 Apr 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·