Hi,
As many of you, I'm tryng to compile pc-ble-driver (v4.1.2) found in https://github.com/NordicSemiconductor/pc-ble-driver/tree/v4.1.2, just to see how the code works and to re-use some parts in a Python project that I'm developing using the nRF52840 Dongle.
The Operative System is Windows 10 64-bit.
I've completed successfully the following steps Driver installation, Driver validation, Installing tools, Installing dependencies until facing troubles in Compiling pc-ble-driver on Windows:
- First problem encountered when Installing vcpkg dependencies: from the System Environment, I had to delete VCPKG_ROOT variable (previously set in the step 5 of Installing dependencies on Windows) and leave only the vcpkg correct link in path variable; after that I was able to install the vcpkg dependencies
mkdir build
cd build
vcpkg install asio
vcpkg install catch2
vcpkg install --head spdlog
- Second problem encountered at point "CMake Select the Visual Studio compiler to use according to this article: Build C/C++ code on the command line": (here I'm asking if someone can help me)
in this section, the System Environment variables CC and CXX were set for MSVC compiler, and the cmake answer is as follow:
PS C:\Users\Fabio\Documents\nRF52840_Dongle\pc-ble-driver-4.1.2\build> cmake -G Ninja .. -- NRF_BLE_DRIVER_VERSION not specified, setting it to 0.0.0 -- CONNECTIVITY_VERSION not specified, setting it to 0.0.0 -- The C compiler identification is MSVC 19.27.29112.0 -- The CXX compiler identification is MSVC 19.27.29112.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - failed -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.27.29110/bin/Hostx86/x86/cl.exe -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.27.29110/bin/Hostx86/x86/cl.exe - broken CMake Error at C:/Program Files/CMake/share/cmake-3.18/Modules/CMakeTestCCompiler.cmake:66 (message): The C compiler "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.27.29110/bin/Hostx86/x86/cl.exe" is not able to compile a simple test program. It fails with the following output: Change Dir: C:/Users/Fabio/Documents/nRF52840_Dongle/pc-ble-driver-4.1.2/build/CMakeFiles/CMakeTmp Run Build Command(s):C:/ProgramData/chocolatey/bin/ninja.exe cmTC_23be1 && [1/2] Building C object CMakeFiles\cmTC_23be1.dir\testCCompiler.c.obj [2/2] Linking C executable cmTC_23be1.exe FAILED: cmTC_23be1.exe cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_23be1.dir --rc=rc --mt=CMAKE_MT-NOTFOUND --manifests -- C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\1427~1.291\bin\Hostx86\x86\link.exe /nologo CMakeFiles\cmTC_23be1.dir\testCCompiler.c.obj /out:cmTC_23be1.exe /implib:cmTC_23be1.lib /pdb:cmTC_23be1.pdb /version:0.0 /machine:X86 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cmd.exe /C "cd /D C:\Users\Fabio\Documents\nRF52840_Dongle\pc-ble-driver-4.1.2\build\CMakeFiles\CMakeTmp && powershell -noprofile -executionpolicy Bypass -file C:/src/vcpkg/scripts/buildsystems/msbuild/applocal.ps1 -targetBinary C:/Users/Fabio/Documents/nRF52840_Dongle/pc-ble-driver-4.1.2/build/CMakeFiles/CMakeTmp/cmTC_23be1.exe -installedDir C:/src/vcpkg/installed/x86-windows/debug/bin -OutVariable out"" RC Pass 1: command "rc /fo CMakeFiles\cmTC_23be1.dir/manifest.res CMakeFiles\cmTC_23be1.dir/manifest.rc" failed (exit code 0) with the following output: The system cannot find the file specified ninja: build stopped: subcommand failed. CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:25 (project) -- Configuring incomplete, errors occurred! See also "C:/Users/Fabio/Documents/nRF52840_Dongle/pc-ble-driver-4.1.2/build/CMakeFiles/CMakeOutput.log". See also "C:/Users/Fabio/Documents/nRF52840_Dongle/pc-ble-driver-4.1.2/build/CMakeFiles/CMakeError.log". PS C:\Users\Fabio\Documents\nRF52840_Dongle\pc-ble-driver-4.1.2\build>
So, long story short, I'm blocked: Can any one please help me?
P.S. As a completion, but don't think is part of the problem, "gcc-arm-none-eabi-9-2020-q2-update-win32" was installed and
the `Mass Storage Device` was disable (using regedit ), as described in Driver installation
Thank you.
Fabio