From b03726903dcfa820305056a318bab9441066ceaf Mon Sep 17 00:00:00 2001 From: Freddie Akeroyd Date: Mon, 16 Dec 2019 19:11:27 +0000 Subject: [PATCH] Fix linker error on WIN32 --- src/AsynDriverInterface.cc | 24 ++++++++++++------------ src/StreamError.cc | 5 ----- src/devStream.h | 5 +++-- 3 files changed, 15 insertions(+), 19 deletions(-) diff --git a/src/AsynDriverInterface.cc b/src/AsynDriverInterface.cc index 546a548..f56e5f0 100644 --- a/src/AsynDriverInterface.cc +++ b/src/AsynDriverInterface.cc @@ -17,18 +17,6 @@ * * ***************************************************************/ -#include "StreamBusInterface.h" -#include "StreamError.h" -#include "StreamBuffer.h" - -#include "asynDriver.h" -#include "asynOctet.h" -#include "asynInt32.h" -#include "asynUInt32Digital.h" -#include "asynGpibDriver.h" - -#include "devStream.h" - #ifdef EPICS_3_13 #include #include @@ -43,6 +31,18 @@ extern "C" { #include "iocsh.h" #endif +#include "StreamBusInterface.h" +#include "StreamError.h" +#include "StreamBuffer.h" + +#include "asynDriver.h" +#include "asynOctet.h" +#include "asynInt32.h" +#include "asynUInt32Digital.h" +#include "asynGpibDriver.h" + +#include "devStream.h" + #include "MacroMagic.h" #define Z PRINTF_SIZE_T_PREFIX diff --git a/src/StreamError.cc b/src/StreamError.cc index 29757c5..46066da 100644 --- a/src/StreamError.cc +++ b/src/StreamError.cc @@ -27,12 +27,7 @@ int streamDebug = 0; int streamError = 1; -extern "C" { -#ifdef _WIN32 -__declspec(dllexport) -#endif FILE *StreamDebugFile = NULL; -} #ifndef va_copy #ifdef __va_copy diff --git a/src/devStream.h b/src/devStream.h index 7b23676..89f2db3 100644 --- a/src/devStream.h +++ b/src/devStream.h @@ -88,8 +88,7 @@ typedef const struct format_s { const struct StreamFormat* priv; } format_t; -epicsShareExtern FILE* StreamDebugFile; -extern const char StreamVersion []; +extern FILE* StreamDebugFile; typedef long (*streamIoFunction) (dbCommon*, format_t*); @@ -97,6 +96,8 @@ typedef long (*streamIoFunction) (dbCommon*, format_t*); extern "C" { #endif +extern const char StreamVersion []; + long streamInit(int after); long streamInitRecord(dbCommon *record, const struct link *ioLink,