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

Build wxWidgets


Install CMake:

Download but use the newer cmake-3.10.0-win64-x64.msi

Install SoapySDR

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:

  1. Windows Start then search for 'Developer Command Prompt for VS2017'. Right click and run as administrator.
  2. From the cmd prompt enter:
    • CD C:\MSVCDev\ then
    • make --build SoapySDR_win64\install --config Release --target install

I get the following:

Build succeeded.

"C:\MSVCDev\SoapySDR_win64\Install\install.vcxproj" (default target) (1) ->
"C:\MSVCDev\SoapySDR_win64\Install\ALL_BUILD.vcxproj" (default target) (3) ->
"C:\MSVCDev\SoapySDR_win64\Install\lib\SoapySDR.vcxproj" (default target) (4) ->
(ClCompile target) ->
C:\MSVCDev\SoapySDR\lib\Device.cpp(278): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible l
oss of data [C:\MSVCDev\SoapySDR_win64\Install\lib\SoapySDR.vcxproj]
C:\MSVCDev\SoapySDR\lib\DeviceC.cpp(38): warning C4996: 'strncpy': This function or variable may be unsafe. Consider
using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\MSVCDev\

2 Warning(s)
0 Error(s)

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\bin
I use Rapid Environment Editor for this

Build CubicSDR:

  1. Clone or download ZIP from https://github.com/cjcliffe/CubicSDR/ to C:\MSVCDev\CubicSDR and unpack the Zip to this directory
  2. Run CMake GUI
  3. Choose C:/MSVCDev/CubicSDR for source.
  4. Choose: C:/MSVCDev/SoapySDR_win64/ for Build directory
  5. Click Configure.
  6. Choose "Visual Studio 15 2017 Win64" and Finish
  7. Set wxWidgets_ROOT_DIR to "C:\MSVCDev\wxWidgets-3.1.0".
  8. Set wxWidgets_LIB_DIR to "C:\MSVCDev\wxWidgets-3.1.0\lib\vc_x64_lib".
  9. Click Configure and continue with new values
  10. Set BUILD_INSTALLER check box (selected)
  11. Set BUNDLE_SOAPY_MODS check box (selected)
  12. Set BUNDLE_MODS_ONLY check box (selected)
  13. Click Configure again, all should be good, then Generate.
  14. CMake should then look like this:

  1. Navigate to C:\MSVCDev\CubicSDR_win64\ in explorer and open CubicSDR.sln to start Visual Studio.
  2. Once open select "Release" and "x64" build configuration and then "Build Solution" (F6)
  3. 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.