This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Trying to build pc-ble-driver for a nRF52840 dongle project

I'm trying to build the pc-ble-driver (https://github.com/NordicSemiconductor/pc-ble-driver) to be able to use the nRF52840 as a receiver for a thermometer.  See https://devzone.nordicsemi.com/f/nordic-q-a/65516/using-nrf52840-dongle-as-receiver-client-for-onset-thermometer for details.

I have followed the instructions I think, but got an error at building the pc-ble-driver:  See output below.  I was on step 2 of the section "Compiling pc-ble-driver from source". To handle the part about "CMake Select the Visual Studio compiler to use according to this article: Build C/C++ code on the command line" I opened a Developer Command Prompt for VS2019 which was one of the suggestions.  I am on a Windows 10 machine running Visual Studio 2019.

Can somebody tell me what I'm doing wrong?

Thanks,

Andrew

Console Output

C:\Nordic\pc-ble-driver>cd build

C:\Nordic\pc-ble-driver\build>cmake -G Ninja ..
-- NRF_BLE_DRIVER_VERSION not specified, setting it to 0.0.0
-- Architecture not set, using native 64-bit toolchain.
CMake Error at test/CMakeLists.txt:11 (find_package):
Could not find a package configuration file provided by "spdlog" with any
of the following names:

spdlogConfig.cmake
spdlog-config.cmake

Add the installation prefix of "spdlog" to CMAKE_PREFIX_PATH or set
"spdlog_DIR" to a directory containing one of the above files. If "spdlog"
provides a separate development package or SDK, be sure it has been
installed.


-- Configuring incomplete, errors occurred!
See also "C:/Nordic/pc-ble-driver/build/CMakeFiles/CMakeOutput.log".
See also "C:/Nordic/pc-ble-driver/build/CMakeFiles/CMakeError.log".

C:\Nordic\pc-ble-driver\build>

  • I get the same output as Andrew from running....

    ">cmake -G Ninja .."

    and

    "vcpkg install asio catch2 spdlog"

    What's different from Installing dependencies on Windows, is that I had to download vcpkg to a different directory, otherwise the following would occur from running boostrap in C:\Windows\System32\vcpkg>

    C:\Windows\System32\vcpkg>.\bootstrap-vcpkg.bat

    Building vcpkg.exe ...

    MSBUILD : error MSB1009: Project file does not exist.
    Switch: C:\Windows\System32\vcpkg\toolsrc\dirs.proj
    C:\Windows\System32\vcpkg\scripts\bootstrap.ps1 : Building vcpkg.exe failed. Please ensure you have installed Visual
    Studio with the Desktop C++ workload and the Windows SDK for Desktop C++.
    At line:1 char:4
    + & {& 'C:\Windows\System32\vcpkg\scripts\bootstrap.ps1' }
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,bootstrap.ps1

    Next step.. Then add the vcpkg location to the PATH and VCPKG_ROOT environment variable.

    And from there I added C:\Users\michael.larson\vcpkg to the user environment variable Path (NOT system variable!).  These are the only things that are different in my setup. Otherwise, again the output for

    ">cmake -G Ninja .."

    and

    "vcpkg install asio catch2 spdlog"

    are the same as Andre.. Any help would be appreciated!! 

     

Related