I'm trying to cross compile pulseview for windows, in an arch Linux system.

My plan is to make a new user, grab MXE, and then use sigrok-cross-mingw to compile pulseview.

Here we go:
1) Create the new user:
[cedric@cedric ~]$ su
Password:
[root@cedric cedric]# useradd sigrok
[root@cedric cedric]# mkdir /home/sigrok
[root@cedric cedric]# chown sigrok /home//sigrok/
[root@cedric cedric]# su sigrok
[sigrok@cedric cedric]$ cd
[sigrok@cedric ~]$ pwd
/home/sigrok
[sigrok@cedric ~]$
2) get MXE:
$ git clone https://github.com/mxe/mxe.git
3) get sigrok-cross-mingw
$ git clone git://sigrok.org/sigrok-util
4) compile pulseview:
$ cd sigrok-util/cross-compile/mingw/
$ ./sigrok-cross-mingw

The compile fails with errors like this: (The full console output is attached) What did i miss?
make  all-am
  CC       serialport.lo
  CC       timing.lo
  CC       windows.lo
windows.c:27:52: error: unknown type name 'DEVINST'
27 | const char *parent_path, DEVINST dev_inst);
      |                                                    ^~~~~~~
windows.c:29:25: error: unknown type name 'PWCHAR'
   29 | static char *wc_to_utf8(PWCHAR wc_buffer, ULONG wc_bytes)
      |                         ^~~~~~
windows.c:29:43: error: unknown type name 'ULONG'
   29 | static char *wc_to_utf8(PWCHAR wc_buffer, ULONG wc_bytes)
      |                                           ^~~~~
windows.c:68:32: error: unknown type name 'HANDLE'
   68 | static char *get_root_hub_name(HANDLE host_controller)
      |                                ^~~~~~
windows.c:98:36: error: unknown type name 'HANDLE'
98 | static char *get_external_hub_name(HANDLE hub, ULONG connection_index)
      |                                    ^~~~~~
windows.c:98:48: error: unknown type name 'ULONG'
98 | static char *get_external_hub_name(HANDLE hub, ULONG connection_index)
      |                                                ^~~~~
windows.c:133:36: error: unknown type name 'HANDLE'
133 | static char *get_string_descriptor(HANDLE hub_device, ULONG connection_index,
      |                                    ^~~~~~
windows.c:133:55: error: unknown type name 'ULONG'
133 | static char *get_string_descriptor(HANDLE hub_device, ULONG connection_index,




_________________________________________________________________
________________________________________________________
Your E-Mail. Your Cloud. Your Office. eclipso Mail Europe. 
https://www.eclipso.de
[cedric@cedric ~]$ su
Password: 
[root@cedric cedric]# useradd sigrok
[root@cedric cedric]# mkdir /home/sigrok
[root@cedric cedric]# chown sigrok /home//sigrok/
[root@cedric cedric]# su sigrok
[sigrok@cedric cedric]$ cd
[sigrok@cedric ~]$ pwd
/home/sigrok
[sigrok@cedric ~]$ git clone https://github.com/mxe/mxe.git
Cloning into 'mxe'...
remote: Enumerating objects: 56125, done.
remote: Counting objects: 100% (951/951), done.
remote: Compressing objects: 100% (323/323), done.
remote: Total 56125 (delta 672), reused 872 (delta 614), pack-reused 55174
Receiving objects: 100% (56125/56125), 26.68 MiB | 2.92 MiB/s, done.
Resolving deltas: 100% (40913/40913), done.
[sigrok@cedric ~]$ git clone git://sigrok.org/sigrok-util
Cloning into 'sigrok-util'...
remote: Enumerating objects: 2466, done.
remote: Counting objects: 100% (2466/2466), done.
remote: Compressing objects: 100% (2370/2370), done.
remote: Total 2466 (delta 1551), reused 153 (delta 88), pack-reused 0
Receiving objects: 100% (2466/2466), 622.33 KiB | 1.56 MiB/s, done.
Resolving deltas: 100% (1551/1551), done.
[sigrok@cedric ~]$ cd sigrok-util/
[sigrok@cedric sigrok-util]$ ls
COPYING.v2  COPYING.v3  cross-compile  debug  firmware  README  source  util
[sigrok@cedric sigrok-util]$ ls -l
total 60
-rw-r--r-- 1 sigrok sigrok 17987 Jan 27 16:26 COPYING.v2
-rw-r--r-- 1 sigrok sigrok 35147 Jan 27 16:26 COPYING.v3
drwxr-xr-x 1 sigrok sigrok    72 Jan 27 16:26 cross-compile
drwxr-xr-x 1 sigrok sigrok   124 Jan 27 16:26 debug
drwxr-xr-x 1 sigrok sigrok   168 Jan 27 16:26 firmware
-rw-r--r-- 1 sigrok sigrok  1412 Jan 27 16:26 README
drwxr-xr-x 1 sigrok sigrok   170 Jan 27 16:26 source
drwxr-xr-x 1 sigrok sigrok    26 Jan 27 16:26 util
[sigrok@cedric sigrok-util]$ cd cross-compile/
[sigrok@cedric cross-compile]$ ls -l
total 0
drwxr-xr-x 1 sigrok sigrok 300 Jan 27 16:26 android
drwxr-xr-x 1 sigrok sigrok  92 Jan 27 16:26 appimage
drwxr-xr-x 1 sigrok sigrok  48 Jan 27 16:26 linux
drwxr-xr-x 1 sigrok sigrok  86 Jan 27 16:26 macosx
drwxr-xr-x 1 sigrok sigrok 324 Jan 27 16:26 mingw
drwxr-xr-x 1 sigrok sigrok  50 Jan 27 16:26 msys2
[sigrok@cedric cross-compile]$ cd mingw/
[sigrok@cedric mingw]$ ls -l
total 60
-rw-r--r-- 1 sigrok sigrok  4600 Jan 27 16:26 FileAssociation.nsh
-rw-r--r-- 1 sigrok sigrok  2687 Jan 27 16:26 libusb1_upgrade.patch
-rw-r--r-- 1 sigrok sigrok 23615 Jan 27 16:26 mxe_fixes.patch
-rw-r--r-- 1 sigrok sigrok   965 Jan 27 16:26 
pulseview-boost-numeric-literals.patch
-rw-r--r-- 1 sigrok sigrok  1295 Jan 27 16:26 pulseview-manual-pdf-hack.patch
-rw-r--r-- 1 sigrok sigrok  1147 Jan 27 16:26 pyconfig.patch
-rw-r--r-- 1 sigrok sigrok  1829 Jan 27 16:26 README
-rwxr-xr-x 1 sigrok sigrok  8139 Jan 27 16:26 sigrok-cross-mingw
[sigrok@cedric mingw]$ nano sigrok-cross-mingw 
[sigrok@cedric mingw]$ cd
[sigrok@cedric ~]$ cd sigrok-util/cross-compile/mingw/
[sigrok@cedric mingw]$ ./sigrok-cross-mingw 
setting up fetch variables ...
setting up toolchain variables ...
starting new build directory: ./build_release_32
preparing Python dependency ...
fetching zadig ...
component libserialport ...
Cloning into 'libserialport'...
remote: Enumerating objects: 57, done.
remote: Counting objects: 100% (57/57), done.
remote: Compressing objects: 100% (45/45), done.
remote: Total 57 (delta 15), reused 20 (delta 12), pack-reused 0
Receiving objects: 100% (57/57), 102.33 KiB | 1.42 MiB/s, done.
Resolving deltas: 100% (15/15), done.
autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I autostuff
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'autostuff'.
libtoolize: copying file 'autostuff/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'autostuff'.
libtoolize: copying file 'autostuff/libtool.m4'
libtoolize: copying file 'autostuff/ltoptions.m4'
libtoolize: copying file 'autostuff/ltsugar.m4'
libtoolize: copying file 'autostuff/ltversion.m4'
libtoolize: copying file 'autostuff/lt~obsolete.m4'
autoreconf: configure.ac: not using Intltool
autoreconf: configure.ac: not using Gtkdoc
autoreconf: running: aclocal --force -I autostuff
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:46: installing 'autostuff/ar-lib'
configure.ac:46: installing 'autostuff/compile'
configure.ac:67: installing 'autostuff/config.guess'
configure.ac:67: installing 'autostuff/config.sub'
configure.ac:44: installing 'autostuff/install-sh'
configure.ac:44: installing 'autostuff/missing'
Makefile.am: installing './INSTALL'
Makefile.am: installing 'autostuff/depcomp'
parallel-tests: installing 'autostuff/test-driver'
autoreconf: Leaving directory '.'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for i686-w64-mingw32.static.posix-strip... no
checking for strip... strip
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking whether make supports the include directive... yes (GNU style)
checking for i686-w64-mingw32.static.posix-gcc... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for i686-w64-mingw32.static.posix-ar... no
checking for i686-w64-mingw32.static.posix-lib... no
checking for i686-w64-mingw32.static.posix-link... no
checking for ar... ar
checking the archiver (ar) interface... ar
checking for i686-w64-mingw32.static.posix-gcc... gcc
checking whether the compiler supports GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to enable C11 features... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking whether ln -s works... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... i686-w64-mingw32.static.posix
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... no
checking for i686-w64-mingw32.static.posix-dumpbin... no
checking for i686-w64-mingw32.static.posix-link... no
checking for dumpbin... no
checking for link... link -dump
checking the name lister (nm) interface... BSD nm
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to 
i686-w64-mingw32.static.posix format... func_convert_file_nix_to_w32
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... 
func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for i686-w64-mingw32.static.posix-file... no
checking for file... file
checking for i686-w64-mingw32.static.posix-objdump... no
checking for objdump... objdump
checking how to recognize dependent libraries... file_magic ^x86 archive 
import|^x86 DLL
checking for i686-w64-mingw32.static.posix-dlltool... no
checking for dlltool... no
checking how to associate runtime and link libraries... 
func_cygming_dll_for_implib_fallback
checking for i686-w64-mingw32.static.posix-ar... ar
checking for archiver @FILE support... @
checking for i686-w64-mingw32.static.posix-strip... strip
checking for i686-w64-mingw32.static.posix-ranlib... no
checking for ranlib... ranlib
checking command to parse nm output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for i686-w64-mingw32.static.posix-mt... no
checking for mt... no
checking if : is a manifest tool... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -DDLL_EXPORT -DPIC
checking if gcc PIC flag -DDLL_EXPORT -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for size_t... yes
checking for struct termios2... yes
checking for struct termios.c_ispeed... no
checking for struct termios.c_ospeed... no
checking for struct termios2.c_ispeed... yes
checking for struct termios2.c_ospeed... yes
checking for gcc options needed to detect all undeclared functions... none 
needed
checking whether BOTHER is declared... yes
checking for struct serial_struct... yes
checking for realpath... yes
checking for sys/file.h... yes
checking for flock... yes
checking for clock_gettime... yes
checking for visibility control... attribute
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating libserialport.pc
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands

libserialport configuration summary:

 - Package version................. 0.1.1
 - Library ABI version............. 1:0:1
 - Prefix.......................... /home/sigrok/sr_mingw_release_32
 - Building on..................... x86_64-pc-linux-gnu
 - Building for.................... i686-w64-mingw32.static.posix
 - Building shared / static........ no / yes

Compile configuration:
 - C compiler...................... gcc
 - C compiler version.............. gcc (GCC) 13.2.1 20230801
 - C compiler flags................ -g -O2
 - Linker flags.................... 

make  all-am
  CC       serialport.lo
  CC       timing.lo
  CC       windows.lo
windows.c:27:52: error: unknown type name 'DEVINST'
   27 |                           const char *parent_path, DEVINST dev_inst);
      |                                                    ^~~~~~~
windows.c:29:25: error: unknown type name 'PWCHAR'
   29 | static char *wc_to_utf8(PWCHAR wc_buffer, ULONG wc_bytes)
      |                         ^~~~~~
windows.c:29:43: error: unknown type name 'ULONG'
   29 | static char *wc_to_utf8(PWCHAR wc_buffer, ULONG wc_bytes)
      |                                           ^~~~~
windows.c:68:32: error: unknown type name 'HANDLE'
   68 | static char *get_root_hub_name(HANDLE host_controller)
      |                                ^~~~~~
windows.c:98:36: error: unknown type name 'HANDLE'
   98 | static char *get_external_hub_name(HANDLE hub, ULONG connection_index)
      |                                    ^~~~~~
windows.c:98:48: error: unknown type name 'ULONG'
   98 | static char *get_external_hub_name(HANDLE hub, ULONG connection_index)
      |                                                ^~~~~
windows.c:133:36: error: unknown type name 'HANDLE'
  133 | static char *get_string_descriptor(HANDLE hub_device, ULONG 
connection_index,
      |                                    ^~~~~~
windows.c:133:55: error: unknown type name 'ULONG'
  133 | static char *get_string_descriptor(HANDLE hub_device, ULONG 
connection_index,
      |                                                       ^~~~~
windows.c:134:36: error: unknown type name 'UCHAR'
  134 |                                    UCHAR descriptor_index)
      |                                    ^~~~~
windows.c:160:55: error: unknown type name 'HANDLE'
  160 | static void enumerate_hub_ports(struct sp_port *port, HANDLE hub_device,
      |                                                       ^~~~~~
windows.c:161:33: error: unknown type name 'ULONG'
  161 |                                 ULONG nb_ports, const char 
*parent_path, DEVINST dev_inst)
      |                                 ^~~~~
windows.c:161:74: error: unknown type name 'DEVINST'
  161 |                                 ULONG nb_ports, const char 
*parent_path, DEVINST dev_inst)
      |                                                                         
 ^~~~~~~
windows.c:256:52: error: unknown type name 'DEVINST'
  256 |                           const char *parent_path, DEVINST dev_inst)
      |                                                    ^~~~~~~
windows.c:285:39: error: unknown type name 'HANDLE'
  285 |                                       HANDLE host_controller_device,
      |                                       ^~~~~~
windows.c:286:39: error: unknown type name 'DEVINST'
  286 |                                       DEVINST dev_inst)
      |                                       ^~~~~~~
windows.c:296:51: error: unknown type name 'DEVINST'
  296 | static void get_usb_details(struct sp_port *port, DEVINST 
dev_inst_match)
      |                                                   ^~~~~~~
windows.c: In function 'get_port_details':
windows.c:363:9: error: unknown type name 'SP_DEVINFO_DATA'
  363 |         SP_DEVINFO_DATA device_info_data = { .cbSize = 
sizeof(device_info_data) };
      |         ^~~~~~~~~~~~~~~
windows.c:363:46: error: field name not in record or union initializer
  363 |         SP_DEVINFO_DATA device_info_data = { .cbSize = 
sizeof(device_info_data) };
      |                                              ^
windows.c:363:46: note: (near initialization for 'device_info_data')
windows.c:364:9: error: unknown type name 'HDEVINFO'
  364 |         HDEVINFO device_info;
      |         ^~~~~~~~
windows.c:367:23: warning: implicit declaration of function 
'SetupDiGetClassDevs' [-Wimplicit-function-declaration]
  367 |         device_info = SetupDiGetClassDevs(NULL, 0, 0,
      |                       ^~~~~~~~~~~~~~~~~~~
windows.c:368:43: error: 'DIGCF_PRESENT' undeclared (first use in this function)
  368 |                                           DIGCF_PRESENT | 
DIGCF_ALLCLASSES);
      |                                           ^~~~~~~~~~~~~
windows.c:368:43: note: each undeclared identifier is reported only once for 
each function it appears in
windows.c:368:59: error: 'DIGCF_ALLCLASSES' undeclared (first use in this 
function)
  368 |                                           DIGCF_PRESENT | 
DIGCF_ALLCLASSES);
      |                                                           
^~~~~~~~~~~~~~~~
windows.c:369:28: error: 'INVALID_HANDLE_VALUE' undeclared (first use in this 
function)
  369 |         if (device_info == INVALID_HANDLE_VALUE)
      |                            ^~~~~~~~~~~~~~~~~~~~
windows.c:372:21: warning: implicit declaration of function 
'SetupDiEnumDeviceInfo' [-Wimplicit-function-declaration]
  372 |         for (i = 0; SetupDiEnumDeviceInfo(device_info, i, 
&device_info_data); i++) {
      |                     ^~~~~~~~~~~~~~~~~~~~~
windows.c:373:17: error: unknown type name 'HKEY'
  373 |                 HKEY device_key;
      |                 ^~~~
windows.c:374:17: error: unknown type name 'DEVINST'
  374 |                 DEVINST dev_inst;
      |                 ^~~~~~~
windows.c:376:17: error: unknown type name 'DWORD'
  376 |                 DWORD size, type;
      |                 ^~~~~
windows.c:377:17: error: unknown type name 'CONFIGRET'
  377 |                 CONFIGRET cr;
      |                 ^~~~~~~~~
windows.c:380:30: warning: implicit declaration of function 
'SetupDiOpenDevRegKey' [-Wimplicit-function-declaration]
  380 |                 device_key = SetupDiOpenDevRegKey(device_info, 
&device_info_data,
      |                              ^~~~~~~~~~~~~~~~~~~~
windows.c:381:51: error: 'DICS_FLAG_GLOBAL' undeclared (first use in this 
function)
  381 |                                                   DICS_FLAG_GLOBAL, 0,
      |                                                   ^~~~~~~~~~~~~~~~
windows.c:382:51: error: 'DIREG_DEV' undeclared (first use in this function)
  382 |                                                   DIREG_DEV, 
KEY_QUERY_VALUE);
      |                                                   ^~~~~~~~~
windows.c:382:62: error: 'KEY_QUERY_VALUE' undeclared (first use in this 
function)
  382 |                                                   DIREG_DEV, 
KEY_QUERY_VALUE);
      |                                                              
^~~~~~~~~~~~~~~
windows.c:386:21: warning: implicit declaration of function 'RegQueryValueExA' 
[-Wimplicit-function-declaration]
  386 |                 if (RegQueryValueExA(device_key, "PortName", NULL, 
&type, (LPBYTE)value,
      |                     ^~~~~~~~~~~~~~~~
windows.c:386:76: error: 'LPBYTE' undeclared (first use in this function)
  386 |                 if (RegQueryValueExA(device_key, "PortName", NULL, 
&type, (LPBYTE)value,
      |                                                                         
   ^~~~~~
windows.c:386:83: error: expected ')' before 'value'
  386 |                 if (RegQueryValueExA(device_key, "PortName", NULL, 
&type, (LPBYTE)value,
      |                                     ~                                   
          ^~~~~
      |                                                                         
          )
windows.c:387:48: error: 'ERROR_SUCCESS' undeclared (first use in this 
function); did you mean 'EXIT_SUCCESS'?
  387 |                                      &size) != ERROR_SUCCESS || type != 
REG_SZ) {
      |                                                ^~~~~~~~~~~~~
      |                                                EXIT_SUCCESS
windows.c:387:73: error: 'REG_SZ' undeclared (first use in this function)
  387 |                                      &size) != ERROR_SUCCESS || type != 
REG_SZ) {
      |                                                                         
^~~~~~
windows.c:388:25: warning: implicit declaration of function 'RegCloseKey' 
[-Wimplicit-function-declaration]
  388 |                         RegCloseKey(device_key);
      |                         ^~~~~~~~~~~
windows.c:397:44: error: request for member 'DevInst' in something not a 
structure or union
  397 |                 dev_inst = device_info_data.DevInst;
      |                                            ^
windows.c:399:22: error: 'CR_FAILURE' undeclared (first use in this function); 
did you mean 'EXIT_FAILURE'?
  399 |                 cr = CR_FAILURE;
      |                      ^~~~~~~~~~
      |                      EXIT_FAILURE
windows.c:400:24: warning: implicit declaration of function 'CM_Get_Parent' 
[-Wimplicit-function-declaration]
  400 |                 while (CM_Get_Parent(&dev_inst, dev_inst, 0) == 
CR_SUCCESS &&
      |                        ^~~~~~~~~~~~~
windows.c:400:65: error: 'CR_SUCCESS' undeclared (first use in this function); 
did you mean 'EXIT_SUCCESS'?
  400 |                 while (CM_Get_Parent(&dev_inst, dev_inst, 0) == 
CR_SUCCESS &&
      |                                                                 
^~~~~~~~~~
      |                                                                 
EXIT_SUCCESS
windows.c:401:30: warning: implicit declaration of function 
'CM_Get_DevNode_Registry_PropertyA' [-Wimplicit-function-declaration]
  401 |                        (cr = CM_Get_DevNode_Registry_PropertyA(dev_inst,
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
windows.c:402:34: error: 'CM_DRP_CLASS' undeclared (first use in this function)
  402 |                                  CM_DRP_CLASS, 0, class, &size, 0)) != 
CR_SUCCESS) { }
      |                                  ^~~~~~~~~~~~
windows.c:409:44: error: request for member 'DevInst' in something not a 
structure or union
  409 |                 dev_inst = device_info_data.DevInst;
      |                                            ^
windows.c:412:27: error: 'CM_DRP_FRIENDLYNAME' undeclared (first use in this 
function)
  412 |                           CM_DRP_FRIENDLYNAME, 0, description, &size, 
0)) != CR_SUCCESS
      |                           ^~~~~~~~~~~~~~~~~~~
windows.c:420:40: error: 'MAX_DEVICE_ID_LEN' undeclared (first use in this 
function)
  420 |                         char device_id[MAX_DEVICE_ID_LEN];
      |                                        ^~~~~~~~~~~~~~~~~
windows.c:423:52: error: request for member 'DevInst' in something not a 
structure or union
  423 |                         dev_inst = device_info_data.DevInst;
      |                                                    ^
windows.c:426:37: warning: implicit declaration of function 'CM_Get_Device_IDA' 
[-Wimplicit-function-declaration]
  426 |                                 if (CM_Get_Device_IDA(dev_inst, 
device_id,
      |                                     ^~~~~~~~~~~~~~~~~
windows.c:435:71: error: 'CM_DRP_COMPATIBLEIDS' undeclared (first use in this 
function)
  435 |                                                                       
CM_DRP_COMPATIBLEIDS, 0,
      |                                                                       
^~~~~~~~~~~~~~~~~~~~
windows.c:452:33: error: unknown type name 'DWORD'
  452 |                                 DWORD address;
      |                                 ^~~~~
windows.c:454:81: error: 'CM_DRP_ADDRESS' undeclared (first use in this 
function)
  454 |                                 if 
(CM_Get_DevNode_Registry_PropertyA(dev_inst, CM_DRP_ADDRESS,
      |                                                                         
        ^~~~~~~~~~~~~~
windows.c:462:29: error: 'struct sp_port' has no member named 'usb_path'
  462 |                         port->usb_path = strdup(usb_path);
      |                             ^~
windows.c:466:25: error: unknown type name 'HANDLE'
  466 |                         HANDLE handle;
      |                         ^~~~~~
windows.c:470:34: warning: implicit declaration of function 'CreateFileA' 
[-Wimplicit-function-declaration]
  470 |                         handle = CreateFileA(escaped_port_name, 
GENERIC_READ, 0, 0,
      |                                  ^~~~~~~~~~~
windows.c:470:65: error: 'GENERIC_READ' undeclared (first use in this function)
  470 |                         handle = CreateFileA(escaped_port_name, 
GENERIC_READ, 0, 0,
      |                                                                 
^~~~~~~~~~~~
windows.c:471:46: error: 'OPEN_EXISTING' undeclared (first use in this function)
  471 |                                              OPEN_EXISTING,
      |                                              ^~~~~~~~~~~~~
windows.c:472:46: error: 'FILE_ATTRIBUTE_NORMAL' undeclared (first use in this 
function)
  472 |                                              
FILE_ATTRIBUTE_NORMAL|FILE_FLAG_OVERLAPPED, 0);
      |                                              ^~~~~~~~~~~~~~~~~~~~~
windows.c:472:68: error: 'FILE_FLAG_OVERLAPPED' undeclared (first use in this 
function)
  472 |                                              
FILE_ATTRIBUTE_NORMAL|FILE_FLAG_OVERLAPPED, 0);
      |                                                                    
^~~~~~~~~~~~~~~~~~~~
windows.c:474:25: warning: implicit declaration of function 'CloseHandle' 
[-Wimplicit-function-declaration]
  474 |                         CloseHandle(handle);
      |                         ^~~~~~~~~~~
windows.c:477:25: warning: implicit declaration of function 'get_usb_details'; 
did you mean 'get_port_details'? [-Wimplicit-function-declaration]
  477 |                         get_usb_details(port, device_info_data.DevInst);
      |                         ^~~~~~~~~~~~~~~
      |                         get_port_details
windows.c:477:63: error: request for member 'DevInst' in something not a 
structure or union
  477 |                         get_usb_details(port, device_info_data.DevInst);
      |                                                               ^
windows.c:420:30: warning: unused variable 'device_id' [-Wunused-variable]
  420 |                         char device_id[MAX_DEVICE_ID_LEN];
      |                              ^~~~~~~~~
windows.c:482:9: warning: implicit declaration of function 
'SetupDiDestroyDeviceInfoList' [-Wimplicit-function-declaration]
  482 |         SetupDiDestroyDeviceInfoList(device_info);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
windows.c: In function 'list_ports':
windows.c:489:9: error: unknown type name 'HKEY'
  489 |         HKEY key;
      |         ^~~~
windows.c:490:9: error: unknown type name 'TCHAR'
  490 |         TCHAR *value, *data;
      |         ^~~~~
windows.c:491:9: error: unknown type name 'DWORD'
  491 |         DWORD max_value_len, max_data_size, max_data_len;
      |         ^~~~~
windows.c:492:9: error: unknown type name 'DWORD'
  492 |         DWORD value_len, data_size, data_len;
      |         ^~~~~
windows.c:493:9: error: unknown type name 'DWORD'
  493 |         DWORD type, index = 0;
      |         ^~~~~
windows.c:494:9: error: unknown type name 'LSTATUS'; did you mean 'CSTATUS'?
  494 |         LSTATUS result;
      |         ^~~~~~~
      |         CSTATUS
windows.c:500:23: warning: implicit declaration of function 'RegOpenKeyEx' 
[-Wimplicit-function-declaration]
  500 |         if ((result = RegOpenKeyEx(HKEY_LOCAL_MACHINE, 
_T("HARDWARE\\DEVICEMAP\\SERIALCOMM"),
      |                       ^~~~~~~~~~~~
windows.c:500:36: error: 'HKEY_LOCAL_MACHINE' undeclared (first use in this 
function)
  500 |         if ((result = RegOpenKeyEx(HKEY_LOCAL_MACHINE, 
_T("HARDWARE\\DEVICEMAP\\SERIALCOMM"),
      |                                    ^~~~~~~~~~~~~~~~~~
windows.c:500:56: warning: implicit declaration of function '_T' 
[-Wimplicit-function-declaration]
  500 |         if ((result = RegOpenKeyEx(HKEY_LOCAL_MACHINE, 
_T("HARDWARE\\DEVICEMAP\\SERIALCOMM"),
      |                                                        ^~
windows.c:501:28: error: 'KEY_QUERY_VALUE' undeclared (first use in this 
function)
  501 |                         0, KEY_QUERY_VALUE, &key)) != ERROR_SUCCESS) {
      |                            ^~~~~~~~~~~~~~~
windows.c:501:55: error: 'ERROR_SUCCESS' undeclared (first use in this 
function); did you mean 'EXIT_SUCCESS'?
  501 |                         0, KEY_QUERY_VALUE, &key)) != ERROR_SUCCESS) {
      |                                                       ^~~~~~~~~~~~~
      |                                                       EXIT_SUCCESS
windows.c:504:31: error: 'ERROR_FILE_NOT_FOUND' undeclared (first use in this 
function)
  504 |                 if (result != ERROR_FILE_NOT_FOUND) {
      |                               ^~~~~~~~~~~~~~~~~~~~
windows.c:505:25: warning: implicit declaration of function 'SetLastError' 
[-Wimplicit-function-declaration]
  505 |                         SetLastError(result);
      |                         ^~~~~~~~~~~~
windows.c:511:23: warning: implicit declaration of function 'RegQueryInfoKey' 
[-Wimplicit-function-declaration]
  511 |         if ((result = RegQueryInfoKey(key, NULL, NULL, NULL, NULL, 
NULL, NULL, NULL,
      |                       ^~~~~~~~~~~~~~~
windows.c:517:47: error: 'TCHAR' undeclared (first use in this function)
  517 |         max_data_len = max_data_size / sizeof(TCHAR);
      |                                               ^~~~~
windows.c:530:17: warning: implicit declaration of function 'RegEnumValue' 
[-Wimplicit-function-declaration]
  530 |                 RegEnumValue(key, index, value, &value_len,
      |                 ^~~~~~~~~~~~
windows.c:531:39: error: 'LPBYTE' undeclared (first use in this function)
  531 |                         NULL, &type, (LPBYTE)data, &data_size) == 
ERROR_SUCCESS)
      |                                       ^~~~~~
windows.c:531:46: error: expected ')' before 'data'
  531 |                         NULL, &type, (LPBYTE)data, &data_size) == 
ERROR_SUCCESS)
      |                                              ^~~~
      |                                              )
windows.c:530:29: note: to match this '('
  530 |                 RegEnumValue(key, index, value, &value_len,
      |                             ^
windows.c:533:29: error: 'REG_SZ' undeclared (first use in this function)
  533 |                 if (type == REG_SZ) {
      |                             ^~~~~~
windows.c:548:38: warning: passing argument 2 of 'strcpy' from incompatible 
pointer type [-Wincompatible-pointer-types]
  548 |                         strcpy(name, data);
      |                                      ^~~~
      |                                      |
      |                                      int *
In file included from libserialport_internal.h:52,
                 from windows.c:21:
/usr/include/string.h:141:70: note: expected 'const char * restrict' but 
argument is of type 'int *'
  141 | extern char *strcpy (char *__restrict __dest, const char *__restrict 
__src)
      |                                               
~~~~~~~~~~~~~~~~~~~~~~~^~~~~
make[1]: *** [Makefile:751: windows.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:608: all] Error 2
[sigrok@cedric mingw]$ 
_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to