I'm struggling to compile this project with the qmake generated Nmake-files.
E.g. this error seems related to a missing USE_SOAPY:
src\sound\soundinterfacefactory.cpp(89): error C2259: 'CSoundInMMSystem':
cannot instantiate abstract class
windows/Sound.h(54): note: see declaration of 'CSoundInMMSystem'
src\sound\soundinterfacefactory.cpp(89): note: due to following members:
src\sound\soundinterfacefactory.cpp(89):
note: 'bool CSoundInInterface::Read(CVector<short> &,CParameter &)': is abstract
sound\soundinterface.h(44): note: see declaration of 'CSoundInInterface::Read'
src\sound\soundinterfacefactory.cpp(89): error C2259:
'CSoundInMMSystem': cannot instantiate abstract class
windows/Sound.h(54): note: see declaration of 'CSoundInMMSystem'
src\sound\soundinterfacefactory.cpp(89): note: due to following members:
src\sound\soundinterfacefactory.cpp(89):
note: 'bool CSoundInInterface::Read(CVector<short> &,CParameter &)': is abstract
Then trying to build with CONFIG += soapysdr, fails to compile the same file:
Hello Gisle and thanks for your enquiry. I haven't tried building my branch (dream-ollie or dream-ollie-deployed) on Windows so I'm not surprised there are issues. I'll try to help you later this afternoon, but to point me in the right direction: are you wanting to use Dream with an SDR front-end of some kind, using the SoapySDR library? That's the main thing that my branches offer in addition to e.g. dream-rafa.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've just looked and I see what you mean about the #include being omitted if WIN32 is defined. If you do want to use Soapy, I think the first step would be to move that outside that #if altogether. Have you been able to install Soapy itself? It looks like there are Windows installers for it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
And there areIMHO too many #ifdef tests in this ollie branch;
* A test for HAVE_LIBZis superflous. zlib is required.
* Seems to me SoapySDR is required too.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The source is designed to be able to build with a wide range of different configurations: e.g. it can use different audio decoding libraries, different sound devices etc. Trying to make these all work at the same time is like whacking moles, but feedback from people like yourself who have a different configuration is a great help to us, so thanks for taking the time to post.
If it won't build without Soapy, that's my bad, because it should be possible to build it to use a soundcard input carrying a low IF or I/Q signal, just like it always did.
The immediate problem with Windows, when you don't haveUSE_SOAPY defined, is that the function signature for Read() doesn't match the abstract base-class method: it's currently:
The param argument isn't used, but it needs to be there for the compiler to recognise that Read() is intended to implement the base-class Read() function. Without it, the compiler will treat it as a separate function, leaving the base-class function un-implemented, making it impossible to instantiate CSoundInMMSystem.
If the above explanation doesn't make sense, you'll find lots of explanations of pure virtual functions, abstract base classes etc. on the web, for example here.
Let
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, I've fixed that.
It now compiles, but running DreamConsole --test 1, it aborts on a sample-rate of 96000.
In SoapyRTLSdr/settings.cpp:
throwstd::runtime_error("setSampleRate failed: RTL-SDR does not support this sample rate");
And Dream.exe crashes at start-up:
classCUpstreamDI:publicCReceiverModul<_BINARY,_BINARY>,publicCPacketSink{public:CUpstreamDI();virtual~CUpstreamDI();/* CRSIMDIInInterface */boolSetOrigin(conststd::string&strAddr);boolGetInEnabled(){returnsource!=nullptr;}// << here
since this == nullptr !? How can this happen?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm struggling to compile this project with the qmake generated Nmake-files.
E.g. this error seems related to a missing
USE_SOAPY
:Then trying to build with
CONFIG += soapysdr
, fails to compile the same file:since this is not in the
WIN32
part:So what CONFIG-settings are allowed on Windows?
And most importantly, what does this
cannot instantiate abstract class
really mean?I'm not so fluent in C++.
Hello Gisle and thanks for your enquiry. I haven't tried building my branch (dream-ollie or dream-ollie-deployed) on Windows so I'm not surprised there are issues. I'll try to help you later this afternoon, but to point me in the right direction: are you wanting to use Dream with an SDR front-end of some kind, using the SoapySDR library? That's the main thing that my branches offer in addition to e.g. dream-rafa.
I've just looked and I see what you mean about the #include being omitted if WIN32 is defined. If you do want to use Soapy, I think the first step would be to move that outside that #if altogether. Have you been able to install Soapy itself? It looks like there are Windows installers for it.
Sure.
And there areIMHO too many
#ifdef
tests in this ollie branch;* A test for
HAVE_LIBZ
is superflous. zlib is required.* Seems to me SoapySDR is required too.
The source is designed to be able to build with a wide range of different configurations: e.g. it can use different audio decoding libraries, different sound devices etc. Trying to make these all work at the same time is like whacking moles, but feedback from people like yourself who have a different configuration is a great help to us, so thanks for taking the time to post.
If it won't build without Soapy, that's my bad, because it should be possible to build it to use a soundcard input carrying a low IF or I/Q signal, just like it always did.
The immediate problem with Windows, when you don't have
USE_SOAPY
defined, is that the function signature forRead()
doesn't match the abstract base-class method: it's currently:But should be
and the same in the cpp file, i.e. line 108 should be:
The param argument isn't used, but it needs to be there for the compiler to recognise that
Read()
is intended to implement the base-classRead()
function. Without it, the compiler will treat it as a separate function, leaving the base-class function un-implemented, making it impossible to instantiateCSoundInMMSystem
.If the above explanation doesn't make sense, you'll find lots of explanations of pure virtual functions, abstract base classes etc. on the web, for example here.
Let
Ok, I've fixed that.
It now compiles, but running
DreamConsole --test 1
, it aborts on a sample-rate of 96000.In
SoapyRTLSdr/settings.cpp
:And Dream.exe crashes at start-up:
since
this == nullptr
!? How can this happen?But there are other issues. Partly due to a recent Hamlib commit. Attached are my diffs.
Missing
using namespace std;
,std::high_resolution::to_time_t()
etc. etc.