Visual Studio 2019 is here

Vincent Sonnier 2019-04-26 09:20:09 +02:00
parent bee7a3df81
commit 175fb09a1a
1 changed files with 19 additions and 15 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 2017, it works also for Visual Studio 2015. The 2017 version is just a better 2015 version in every way, so use this one preferably.
Visual Studio 2017 also has a better optimizing compiler which may result a faster CubicSDR.
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.
Interesting point, VS2017 produces binaries compatible with VS2015 ones so there is no point of not using VS2017 whatsoever.
Interesting point, VS2019 produces binaries compatible with VS2017 or VS2017 ones so there is no point of not using VS2019 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 2017
# Install Visual Studio Community 2019
If you don't already have Visual Studio 2017 you can install the free Microsoft "Visual Studio Community 2017" version available from https://www.visualstudio.com/downloads/ which was used for this guide.
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.
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.
@ -35,7 +35,7 @@ Download CMake from:
For this guide I've used:
* https://cmake.org/files/v3.11/cmake-3.11.2-win64-x64.msi
* https://cmake.org/files/v3.11/cmake-3.14.2-win64-x64.msi
As recommended, uninstall the older CMake version first if present, then just install CMake with default or preferred options.
@ -45,12 +45,13 @@ 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" and choose "Visual Studio 15 2017 Win64" and Finish
* Click Configure.
* Choose "Visual Studio 16 2019" 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 VS2017" by right-clicking and "Run as Administrator".
Open "Developer Command Prompt for VS 2019" by right-clicking and "Run as Administrator".
From the prompt:
@ -71,7 +72,7 @@ C:\MSVCDEV> cmake --build SoapySDR_win64 --config Release --target install
* Choose `C:\MSVCDev\CubicSDR` for source.
* Choose `C:\MSVCDev\CubicSDR_win64` for build folder.
* Click Configure.
* Choose "Visual Studio 15 2017 Win64" and Finish.
* Choose "Visual Studio 16 2019" 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-3.1.2`
* Set wxWidgets_LIB_DIR to `C:\MSVCDev\wxWidgets-3.1.2\lib\vc_x64_lib`
* Set CMAKE_INSTALL_PREFIX to `C:/MSVCDev/SoapySDR_win64_install`
@ -153,14 +154,15 @@ Copy the file `libusb-1.0.dll` in the `C:\MSVCDev\CubicSDR_win64\x64` directory
* Clone or download https://github.com/librtlsdr/librtlsdr to `C:\MSVCDev\librtlsdr`
* Launch CMake, set source path to `C:/MSVCDev/librtlsdr/`
* Set destination to `C:/MSVCDev/librtlsdr_win64/`
* Click "Configure" and choose "Visual Studio 15 2017 Win64" and Finish
* Click Configure.
* Choose "Visual Studio 16 2019" 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 VS2017" by right-clicking and "Run as Administrator".
Open "Developer Command Prompt for VS 2019" by right-clicking and "Run as Administrator".
From the prompt:
@ -178,14 +180,15 @@ Copy the file `rtlsdr.dll` in the `C:\MSVCDev\CubicSDR_win64\x64` directory wher
* Clone or download ZIP from https://github.com/pothosware/SoapyRTLSDR to `C:\MSVCDev\SoapyRTLSDR`
* Launch CMake, set source path to `C:/MSVCDev/SoapyRTLSDR/`
* Set destination to `C:/MSVCDev/SoapyRTLSDR_win64`
* Click "Configure" and choose "Visual Studio 15 2017 Win64" and Finish
* Click Configure.
* Choose "Visual Studio 16 2019" 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`
* 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 VS2017" by right-clicking and "Run as Administrator".
Open "Developer Command Prompt for VS 2019" by right-clicking and "Run as Administrator".
From the prompt:
@ -205,14 +208,15 @@ Copy the generated module file `rtlsdrSupport.dll` in the `C:\MSVCDev\CubicSDR_w
* Clone or download ZIP from https://github.com/pothosware/SoapySDRPlay to `C:\MSVCDev\SoapySDRPlay`
* Launch CMake, set source path to `C:/MSVCDev/SoapySDRPlay`
* Set destination to `C:/MSVCDev/SoapySDRPlay_win64`
* Click "Configure" and choose "Visual Studio 15 2017 Win64" and Finish
* Click Configure.
* Choose "Visual Studio 16 2019" 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`
* Click "Configure" again
* Set LIBSDRPLAY_INCLUDE_DIRS to `C:/Program Files/SDRplay/API/inc`
* Set LIBSDRPLAY_LIBRARIES to `C:/Program Files/SDRplay/API/x64/mir_sdr_api.lib`
* Click "Configure" again and then click "Generate"
Open "Developer Command Prompt for VS2017" by right-clicking and "Run as Administrator".
Open "Developer Command Prompt for VS 2019" by right-clicking and "Run as Administrator".
From the prompt: