Volume 11 Chapter 71
401 Building CubicSDR with Visual Studio 2017-12-04
This project is stalled until I can get some help building the support modules for my HackRF receivers.
I am toying with the idea of switching from SDR-Radio which is a fine piece of Software Defined Radio control software to CubicSDR which is not as well developed as SDR-Radio and lacks some of the features but is Open Source. For me this is a big plus. When something breaks I want to be able to fix it on my own without begging another developer for an update.
CubicSDR is a C++ application that can be developed with MS Visual Studio Community 2017 which is a free, and very will designed tools for just this purpose. The developers of CubicSDR also have a Wiki page that has the details of building Cubic using Visual Studio 2015 so this will be a start. What follows is the same steps from the Wiki but modified as needed to suit the newer version of VS and CMake.
Install Visual Studio Community 2015
Same except install VS 2017
Download but use the newer cmake-3.10.0-win64-x64.msi
Create C:\MSVCDev\SoapySDR and Download SoapySDR Zip from https://github.com/pothosware/SoapySDR to that directory. Unpack it in that directory.
Launch CMake GUI and set it up as follows:
Hit 'Finish' and then 'Configure' button on the next screen. This should clear all the Red entries. Press 'Generate'. It should complete with:
- SoapySDR version: v0.6.1-unknown
- ABI/so version: v0.6
- Install prefix: C:/Program Files/SoapySDR
- Configuring done
- Generating done
Open a Developer command Prompt from VS2017 by:
- Windows Start then search for 'Developer Command Prompt for VS2017'. Right click and run as administrator.
- From the cmd prompt enter:
- CD C:\MSVCDev\ then
- make --build SoapySDR_win64\install --config Release --target install
I get the following:
"C:\MSVCDev\SoapySDR_win64\Install\install.vcxproj" (default target) (1) ->
Update your system environment variables (Search "environment variables" in windows 8/10 search) and append the following to the Path variable:
;C:\Program Files\SoapySDR\binI use Rapid Environment Editor for this
- Clone or download ZIP from https://github.com/cjcliffe/CubicSDR/ to C:\MSVCDev\CubicSDR and unpack the Zip to this directory
- Run CMake GUI
- Choose C:/MSVCDev/CubicSDR for source.
- Choose: C:/MSVCDev/SoapySDR_win64/ for Build directory
- Click Configure.
- Choose "Visual Studio 15 2017 Win64" and Finish
- Set wxWidgets_ROOT_DIR to "C:\MSVCDev\wxWidgets-3.1.0".
- Set wxWidgets_LIB_DIR to "C:\MSVCDev\wxWidgets-3.1.0\lib\vc_x64_lib".
- Click Configure and continue with new values
- Set BUILD_INSTALLER check box (selected)
- Set BUNDLE_SOAPY_MODS check box (selected)
- Set BUNDLE_MODS_ONLY check box (selected)
- Click Configure again, all should be good, then Generate.
- CMake should then look like this:
- Navigate to C:\MSVCDev\CubicSDR_win64\ in explorer and open CubicSDR.sln to start Visual Studio.
- Once open select "Release" and "x64" build configuration and then "Build Solution" (F6)
- CubicSDR.exe should now be in the output folder (i.e. C:\MSVCDev\CubicSDR_win64\x64) and ready to run (minus support modules).
Build Support Modules (Broken from here)
- Clone or download ZIP from https://github.com/pothosware/SoapyRTLSDR to C:\MSVCDev\SoapyRTLSDR
- Download http://sdr.osmocom.org/trac/attachment/wiki/rtl-sdr/RelWithDebInfo.zip and unpack to C:\MSVCDev\rtl-sdr-release\
- Copy C:\MSVCDev\rtl-sdr-release\x64\libusb-1.0.dll and C:\MSVCDev\rtl-sdr-release\x64\rtlsdr.dll to C:\Program Files\SoapySDR\bin
- Launch CMake, set source path to C:/MSVCDev/SoapyRTLSDR/
- Set destination to C:/MSVCDev/SoapyRTLSDR_win64/
- Click "Configure" and choose "Visual Studio 14 2015 Win64" and Finish
- Set RTLSDR_INCLUDE_DIR to C:/MSVCDev/rtl-sdr-release/
- Set RTLSDR_LIBRARY to C:/MSVCDev/rtl-sdr-release/x64/rtlsdr.lib
- Click "Configure" again and then click "Generate"
Open "Developer Command Prompt for VS2015" by right-clicking and "Run as Administrator".
From the prompt:
C:\> cd C:\MSVCDev\ C:\MSVCDEV> cmake --build SoapyRTLSDR_win64 --config Release --target install ... Bunch of building ... 0 Error(s)
Copy the generated module file rtlsdrSupport.dll in the C:\MSVCDev\CubicSDR_win64\x64\modules directory where CubicSDR can find it.