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  <20172018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Linking PVA against C++11 stuff
From: Michael Davidsaver <[email protected]>
To: Ralph Lange <[email protected]>, EPICS Core Talk <[email protected]>
Date: Fri, 22 Dec 2017 09:12:13 -0600
On 12/22/2017 06:14 AM, Ralph Lange wrote:
> Hi,
> 
> We just found out that we have a set of libraries/applications that use C++11 and thus call the GNU compiler on our RHEL7.4 systems (gcc 4.8.5) with "-std=c==0x".
> 
> When linking, the build searches for pvData/pvAccess functions with the argument type "std::shared_ptr<>", while the EPICS PVA libraries provide the functions for an argument of type "std::tr1::shared_ptr<>", and the linking fails.
> 
> What are our options?

Immediately, in each of the compile units where -std=c++0x is given, define the following before pv/sharedPtr.h is included.

> #define SHARED_FROM_MANUAL
> #include <tr1/memory>

This overrides the logic which selects shared_ptr implementations and always
uses the TR1 implementation directly.  This will work as long as the PVA modules
built with c++98.


Alternately, you can hack pv/sharedPtr.h to make an explicit choice to always use TR1,
or hack Base (the core module) to always default to -std=c++11.

Attachment: signature.asc
Description: OpenPGP digital signature


References:
Linking PVA against C++11 stuff Ralph Lange

Navigate by Date:
Prev: Linking PVA against C++11 stuff Ralph Lange
Next: Problem exiting simDetector IOC with base 7.0.1.1 on windows-x64 Mark Rivers
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Linking PVA against C++11 stuff Ralph Lange
Next: Problem exiting simDetector IOC with base 7.0.1.1 on windows-x64 Mark Rivers
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
ANJ, 27 Dec 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·