Here is what I have done: -
1. Clean install of Windows 10 (Running in Oracle VirtualBox)
a. Version 20H2 (OS Build 19042.685)
2. Install MSYS2
a. https://www.msys2.org/ (Main website)
b. Download installer
i. https://repo.msys2.org/distrib/x86_64/msys2-x86_64-20201109.exe
ii. msys2-x86_64-20201109.exe
c. Run installer
i. Install location "C:\msys64"
3. Setup MSYS2 (Run in MSYS2 shell)
a. Update the package database and core system packages
i. pacman -Syu
b. Close MSYS2 and re-run
i. pacman -Su
c. Install the required packages
i. pacman -Sy git autoconf automake libtool gcc binutils make pkg-config
4. Download libserialport source code (Run in MSYS2 shell)
a. cd C:\Code
b. git clone git://sigrok.org/libserialport
c. cd libserialport
d. ./autogen.sh
e. ./configure
f. make
g. make install (Not "sudo make install" as "bash: sudo: command not found")
5. Compile examples
a. cd examples/
b. Make
6. Copy required DLLs
a. Copy "msys-serialport-0.dll"
i. From "C:\Code\libserialport\.libs"
ii. To "C:\Code\libserialport\examples"
b. Copy "msys-2.0.dll"
i. From "C:\msys64\usr\bin"
ii. To "C:\Code\libserialport\examples"
7. Run examples
a. cd C:\Code\libserialport\examples
b. dir
c. list_ports
Error: -
C:\Code\libserialport\examples>list_ports
Getting port list.
sp_list_ports() failed!
I have an FTDI USB cable attached, USB Serial Port (COM3)
I am not sure how to proceed, I have tried the code on my main computer (not a virtual machine) and the same error...