diff --git a/exports/export.h b/exports/export.h index 10b79fea5..cda4f61f8 100644 --- a/exports/export.h +++ b/exports/export.h @@ -102,6 +102,18 @@ # define QRTPLIB_API #endif +/* the 'SERIALDV_API' controls the import/export of 'serialdv' symbols + */ +#if !defined(sdrangel_STATIC) +# ifdef serialdv_EXPORTS +# define SERIALDV_API __SDR_EXPORT +# else +# define SERIALDV_API __SDR_IMPORT +# endif +#else +# define SERIALDV_API +#endif + /* the 'SWG_API' controls the import/export of 'swagger' symbols */ #if !defined(sdrangel_STATIC) diff --git a/sdrbase/dsp/dvserialengine.cpp b/sdrbase/dsp/dvserialengine.cpp index ddb4370b9..5aba10314 100644 --- a/sdrbase/dsp/dvserialengine.cpp +++ b/sdrbase/dsp/dvserialengine.cpp @@ -16,14 +16,16 @@ /////////////////////////////////////////////////////////////////////////////////// #include -#include #include #include #include -#include #include #include +#ifndef _MSC_VER +#include +#include #include +#endif #ifndef __WINDOWS__ #include diff --git a/sdrbase/dsp/dvserialworker.cpp b/sdrbase/dsp/dvserialworker.cpp index e72f0f5db..cc5f04b56 100644 --- a/sdrbase/dsp/dvserialworker.cpp +++ b/sdrbase/dsp/dvserialworker.cpp @@ -15,7 +15,8 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// -#include +#include +#include #include "dsp/dvserialworker.h" #include "audio/audiofifo.h" @@ -60,7 +61,7 @@ void DVSerialWorker::process() while (m_running) { - sleep(1); + std::this_thread::sleep_for(std::chrono::seconds(1)); } qDebug("DVSerialWorker::process: stopped"); diff --git a/sdrbase/sdrbase.pro b/sdrbase/sdrbase.pro index 1dd573aeb..2cb0d17e4 100644 --- a/sdrbase/sdrbase.pro +++ b/sdrbase/sdrbase.pro @@ -40,10 +40,11 @@ CONFIG(MSVC):INCLUDEPATH += "C:\softs\boost_1_66_0" CONFIG(MINGW32):INCLUDEPATH += "C:\softs\serialDV" CONFIG(MINGW64):INCLUDEPATH += "C:\softs\serialDV" +CONFIG(MSVC):INCLUDEPATH += "C:\softs\serialDV" CONFIG(macx):INCLUDEPATH += "../../../boost_1_64_0" -MINGW32 || MINGW64 { +MINGW32 || MINGW64 || MSVC { HEADERS += \ dsp/dvserialengine.h \ dsp/dvserialworker.h @@ -224,7 +225,7 @@ HEADERS += audio/audiodevicemanager.h\ webapi/webapiserver.h\ mainparser.h -MINGW32 || MINGW64 { +MINGW32 || MINGW64 || MSVC { LIBS += -L../serialdv/$${build_subdir} -lserialdv } LIBS += -L../httpserver/$${build_subdir} -lhttpserver diff --git a/serialdv/serialdv.pro b/serialdv/serialdv.pro index e1b141383..48b7a38c9 100644 --- a/serialdv/serialdv.pro +++ b/serialdv/serialdv.pro @@ -9,10 +9,14 @@ QT += core TEMPLATE = lib TARGET = serialdv +CONFIG(MSVC):DEFINES += serialdv_EXPORTS + CONFIG(MINGW32):LIBSERIALDVSRC = "C:\softs\serialDV" CONFIG(MINGW64):LIBSERIALDVSRC = "C:\softs\serialDV" +CONFIG(MSVC):LIBSERIALDVSRC = "C:\softs\serialDV" INCLUDEPATH += $$LIBSERIALDVSRC +INCLUDEPATH += ../exports DEFINES += __WINDOWS__=1