EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Unit tests on Windows DLL internals
From: Mark Rivers via Core-talk <core-talk at aps.anl.gov>
To: Ralph Lange <ralph.lange at gmx.de>
Cc: "core-talk at aps.anl.gov" <core-talk at aps.anl.gov>
Date: Wed, 27 Jan 2021 11:57:37 +0000
> (No such problem on Linux where all functions inside the shared library are visible.)


That is true by default, but GCC >= 4 has __attribute__ ((visibility ("hidden"))) which will also hide classes on Linux.


This article makes the argument for why it is a good idea to use it:


https://gcc.gnu.org/wiki/Visibility

Mark

________________________________
From: Core-talk <core-talk-bounces at aps.anl.gov> on behalf of Ralph Lange via Core-talk <core-talk at aps.anl.gov>
Sent: Wednesday, January 27, 2021 5:01 AM
To: EPICS Core Talk
Subject: Unit tests on Windows DLL internals

Question about developing on Windows:

How do you manage unit testing of internal classes in DLLs?

Internal classes (that are not DLL exported) are by design not visible through the DLL interface, which means linking a unit test against the DLL won't allow it to access the internal APIs it is supposed to test.
(No such problem on Linux where all functions inside the shared library are visible.)

I know I can work around by linking the needed objects directly into the test executable. Is there any preferable or better solution?

Thanks,
~Ralph

References:
Unit tests on Windows DLL internals Ralph Lange via Core-talk

Navigate by Date:
Prev: Re: A general question about convert e.g. in longout record drvh, drvl handling Heinz Junkes via Core-talk
Next: Re: Unit tests on Windows DLL internals Michael Davidsaver via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
Navigate by Thread:
Prev: Unit tests on Windows DLL internals Ralph Lange via Core-talk
Next: Re: Unit tests on Windows DLL internals Michael Davidsaver via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
ANJ, 27 Jan 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·