Updated instructions for VS 2022, fix Hamlib to use v4.

Vincent Sonnier 2021-11-12 10:35:13 +01:00
parent 04f52a6ea2
commit 327fca53eb
1 changed files with 17 additions and 17 deletions

@ -3,18 +3,18 @@ Windows7/Windows 8.1/10, Visual Studio 64-bit: -- improvements welcome.
# Overview
This guide describes how to build CubicSDR together with its dependencies and some common SoapySDR modules (support for SDR hardware).
While the focus is on Visual Studio 2019, it works also for either Visual Studio 2017 or even 2015. The 2019 version is the last iteration of the 2015 generation, so use this one preferably.
Visual Studio 2019 also has better compiler optimizations which may result a faster CubicSDR.
While the focus is on Visual Studio 2022, it works also for either 2019, 2017, or even 2015. The 2022 version is the last iteration of the 2015 generation, so use this one preferably.
Visual Studio 2022 also has better compiler optimizations which may result a faster CubicSDR.
Interesting point, VS2019 produces binaries compatible with either VS2015 or VS2017 ones so there is no point of not using VS2019 whatsoever.
Interesting point, VS 2022 produces binaries compatible with earlier 2015 / 2017 / 2019 versions so there is no point of not using VS 2022 whatsoever.
Alternatively if you don't want to compile anything and use pre-built binaries instead, you can install the [PothosSDR distribution](https://github.com/pothosware/PothosSDR/wiki/Tutorial) (Resources / Download installer) which contains a Win64 build of the latest CubicSDR source code together with all the existing SoapySDR modules to talk to any SDR device.
Given a new version is released roughly every month, you may get more recent CubicSDR binaries than from the [official
release page.](https://github.com/cjcliffe/CubicSDR/releases)
# Install Visual Studio Community 2019
# Install Visual Studio Community 2022
If you don't already have Visual Studio 2019 you can install the free Microsoft "Visual Studio Community 2019" version available from https://www.visualstudio.com/downloads/ which was used for this guide.
If you don't already have Visual Studio 2022 you can install the free Microsoft "Visual Studio Community 2022" version available from https://www.visualstudio.com/downloads/ which was used for this guide.
During installation with the 'Visual Studio Installer' make sure you select at least the `C++ Desktop development` category or you'll be unable to compile the project due to the missing C++ tools. Alternatively, you can select more focused `Individual Components` for a finer-grained installation.
@ -33,7 +33,7 @@ Download CMake from:
* http://www.cmake.org/download/
For this guide I've used v3.20.1 found here:
For this guide I've used v3.21.3 found here:
* https://github.com/Kitware/CMake/releases/
@ -44,12 +44,12 @@ Download ZIP or clone SoapySDR from https://github.com/pothosware/SoapySDR to `C
* Launch CMake, set source path to `C:/MSVCDev/SoapySDR/`
* Set destination to `C:/MSVCDev/SoapySDR_win64/`
* Click Configure.
* Choose "Visual Studio 16 2019" as `Specify the generator for this project` and "x64" as `Optional platform for generator` then click Finish.
* Choose "Visual Studio 17 2022" as `Specify the generator for this project` and "x64" as `Optional platform for generator` then click Finish.
* Set CMAKE_INSTALL_PREFIX to `C:/MSVCDev/SoapySDR_win64_install`
* Set SOAPY_SDR_ROOT to `C:/MSVCDev/SoapySDR_win64_install`
* Click Configure again, all should be good, then Generate.
Open "Developer Command Prompt for VS 2019" by right-clicking and "Run as Administrator".
Open "Developer Command Prompt for VS 2022" by right-clicking and "Run as Administrator".
From the prompt:
@ -71,7 +71,7 @@ Copy the file `SoapySDR.dll` in the `C:\MSVCDev\CubicSDR_win64\x64` directory wh
* Choose `C:\MSVCDev\CubicSDR` for source.
* Choose `C:\MSVCDev\CubicSDR_win64` for build folder.
* Click Configure.
* Choose "Visual Studio 16 2019" as `Specify the generator for this project` and "x64" as `Optional platform for generator` then click Finish.
* Choose "Visual Studio 17 2022" as `Specify the generator for this project` and "x64" as `Optional platform for generator` then click Finish.
* Set wxWidgets_ROOT_DIR to `C:\MSVCDev\wxWidgets`
* Click "Configure" again
* Set SoapySDR_DIR to `C:/MSVCDev/SoapySDR_win64_install/cmake`
@ -87,9 +87,9 @@ Configure variables to indicate CubicSDR that modules files will be searched in
* Click "Configure" again
* Set USE_HAMLIB to 1 (checked)
* Click "Configure" again
* Set HAMLIB_DLLS to `C:/MSVCDev/CubicSDR/external/hamlib/64/libhamlib-2.dll`
* Set HAMLIB_DLLS to `C:/MSVCDev/CubicSDR/external/hamlib/64/libhamlib-4.dll`
* Set HAMLIB_INCLUDE_DIR to `C:/MSVCDev/CubicSDR/external/hamlib`
* Set HAMLIB_LIBRARY to `C:/MSVCDev/CubicSDR/external/hamlib/64/libhamlib-2.lib`
* Set HAMLIB_LIBRARY to `C:/MSVCDev/CubicSDR/external/hamlib/64/libhamlib-4.lib`
* Click Configure again, all should be good, then Generate.
* Navigate to `C:\MSVCDev\CubicSDR_win64` in Explorer and open `CubicSDR.sln`.
* Once open select "Release" and "x64" build configuration and then "Build Solution" (F6)
@ -154,14 +154,14 @@ Copy the file `libusb-1.0.dll` in the `C:\MSVCDev\CubicSDR_win64\x64` directory
* Launch CMake, set source path to `C:/MSVCDev/librtlsdr/`
* Set destination to `C:/MSVCDev/librtlsdr_win64/`
* Click Configure.
* Choose "Visual Studio 16 2019" as `Specify the generator for this project` and "x64" as `Optional platform for generator` then click Finish.
* Choose "Visual Studio 17 2022" as `Specify the generator for this project` and "x64" as `Optional platform for generator` then click Finish.
* Set LIBUSB_INCLUDE_DIR to `C:/MSVCDev/libusb-release/libusb-1.0/include`
* Set LIBUSB_LIBRARIES to `C:/MSVCDev/libusb-release/MS64/dll/libusb-1.0.lib`
* Set THREADS_PTHREADS_INCLUDE_DIR to `C:/MSVCDev/pthreads-win32/include`
* Set THREADS_PTHREADS_WIN32_LIBRARY to `C:/MSVCDev/pthreads-win32/lib/x64/pthreadVC2.lib`
* Click "Configure" again and then click "Generate"
Open "Developer Command Prompt for VS 2019" by right-clicking and "Run as Administrator".
Open "Developer Command Prompt for VS 2022" by right-clicking and "Run as Administrator".
From the prompt:
@ -180,14 +180,14 @@ Copy the file `rtlsdr.dll` in the `C:\MSVCDev\CubicSDR_win64\x64` directory wher
* Launch CMake, set source path to `C:/MSVCDev/SoapyRTLSDR/`
* Set destination to `C:/MSVCDev/SoapyRTLSDR_win64`
* Click Configure.
* Choose "Visual Studio 16 2019" as `Specify the generator for this project` and "x64" as `Optional platform for generator` then click Finish.
* Choose "Visual Studio 17 2022" as `Specify the generator for this project` and "x64" as `Optional platform for generator` then click Finish.
* Set SoapySDR_DIR to `C:/MSVCDev/SoapySDR_win64_install/cmake`
* Click "Configure" again
* Set RTLSDR_INCLUDE_DIR to `C:/MSVCDev/librtlsdr/include`
* Set RTLSDR_LIBRARY to `C:/MSVCDev/librtlsdr_win64/src/Release/rtlsdr.lib`
* Click "Configure" again and then click "Generate"
Open "Developer Command Prompt for VS 2019" by right-clicking and "Run as Administrator".
Open "Developer Command Prompt for VS 2022" by right-clicking and "Run as Administrator".
From the prompt:
@ -208,7 +208,7 @@ Copy the generated module file `rtlsdrSupport.dll` in the `C:\MSVCDev\CubicSDR_w
* Launch CMake, set source path to `C:/MSVCDev/SoapySDRPlay`
* Set destination to `C:/MSVCDev/SoapySDRPlay_win64`
* Click Configure.
* Choose "Visual Studio 16 2019" as `Specify the generator for this project` and "x64" as `Optional platform for generator` then click Finish.
* Choose "Visual Studio 17 2022" as `Specify the generator for this project` and "x64" as `Optional platform for generator` then click Finish.
* Set SoapySDR_DIR to `C:/MSVCDev/SoapySDR_win64_install/cmake`
* Click "Configure" again
* Set LIBSDRPLAY_INCLUDE_DIRS to `C:\Program Files\SDRplay\API\inc`
@ -216,7 +216,7 @@ Copy the generated module file `rtlsdrSupport.dll` in the `C:\MSVCDev\CubicSDR_w
* Set RF_GAIN_IN_MENU to 1 (checked)
* Click "Configure" again and then click "Generate"
Open "Developer Command Prompt for VS 2019" by right-clicking and "Run as Administrator".
Open "Developer Command Prompt for VS 2022" by right-clicking and "Run as Administrator".
From the prompt: