From 48770f132fcbc1acd3a2944b55500c7b4ed0165d Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Thu, 4 Oct 2018 20:56:12 -0700 Subject: [PATCH] fix global string constants --- src/pva/pv/pvaConstants.h | 7 ++++--- src/pva/pvaVersion.cpp | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/pva/pv/pvaConstants.h b/src/pva/pv/pvaConstants.h index 9ee652d..d090141 100644 --- a/src/pva/pv/pvaConstants.h +++ b/src/pva/pv/pvaConstants.h @@ -18,6 +18,7 @@ # define epicsExportSharedSymbols # undef pvaConstantsepicsExportSharedSymbols #endif +#include namespace epics { namespace pvAccess { @@ -73,13 +74,13 @@ const epics::pvData::int16 INVALID_DATA_TYPE = 0xFFFF; const epics::pvData::int32 INVALID_IOID = 0; /** Default PVA provider name. */ -const std::string PVACCESS_DEFAULT_PROVIDER; +epicsShareExtern const std::string PVACCESS_DEFAULT_PROVIDER; /** "All-providers registered" PVA provider name. */ -const std::string PVACCESS_ALL_PROVIDERS; +epicsShareExtern const std::string PVACCESS_ALL_PROVIDERS; /** Name of the system env. variable to turn on debugging. */ -const std::string PVACCESS_DEBUG; +epicsShareExtern const std::string PVACCESS_DEBUG; } } diff --git a/src/pva/pvaVersion.cpp b/src/pva/pvaVersion.cpp index f196242..815a3a5 100644 --- a/src/pva/pvaVersion.cpp +++ b/src/pva/pvaVersion.cpp @@ -8,6 +8,7 @@ #define epicsExportSharedSymbols #include +#include using std::stringstream; using std::string; @@ -15,9 +16,9 @@ using std::string; namespace epics { namespace pvAccess { -const std::string PVACCESS_DEFAULT_PROVIDER = "local"; -const std::string PVACCESS_ALL_PROVIDERS = ""; -const std::string PVACCESS_DEBUG = "EPICS_PVA_DEBUG"; +const std::string PVACCESS_DEFAULT_PROVIDER("local"); +const std::string PVACCESS_ALL_PROVIDERS(""); +const std::string PVACCESS_DEBUG("EPICS_PVA_DEBUG"); Version::Version(std::string const & productName, std::string const & implementationLangugage,