Windows compilation is broken
Since the commit 03869359, the compilation on Windows is broken. Here is the log when following the guideline :
C:\local\gitlab\librist>meson compile -C build
Microsoft (R) Build Engine version 16.11.1+3e40a09f8 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Checking whether solution needs to be regenerated.
The Meson build system
Version: 0.59.0
Source dir: C:\local\gitlab\librist
Build dir: C:\local\gitlab\librist\build
Build type: native build
Project name: libRIST
Project version: 0.2.6
C compiler for the host machine: cl (msvc 19.29.30133 "Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30133 fo
r x64")
C linker for the host machine: link link 14.29.30133.0
Host machine cpu family: x86_64
Host machine cpu: x86_64
Has header "pthread.h" : NO
Library ws2_32 found: YES
Compiler for C supports arguments -wd4996: YES (cached)
Compiler for C supports arguments -wd4324: YES (cached)
Compiler for C supports arguments -fvisibility=hidden: NO (cached)
..\meson.build:134: WARNING: Compiler does not support -fvisibility=hidden, all symbols will be public!
Check usable header "stdatomic.h" : NO (cached)
Did not find pkg-config by name 'pkg-config'
Found Pkg-config: NO
Found CMake: C:\Users\ja\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-pa
ckages\Python39\Scripts\cmake.EXE (3.21.3)
Run-time dependency cjson found: NO (tried pkgconfig and cmake)
Has header "cjson/cJSON.h" : NO (cached)
Message: Using builtin cJSON library
Message: Building mbedtls
Run-time dependency mbedcrypto found: NO (tried pkgconfig and cmake)
Has header "mbedtls/aes.h" : NO (cached)
Message: Using builtin mbedtls code
Program C:\Users\ja\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-package
s\Python39\Scripts\meson found: YES (C:\Users\ja\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfr
a8p0\LocalCache\local-packages\Python39\Scripts\meson.exe)
Configuring version.h using configuration
Program objcopy found: NO
Configuring config.h using configuration
Message: Building tools
Library ws2_32 found: YES
Library cmocka found: NO
..\test\rist\meson.build:72: DEPRECATION: ":" is not allowed in test name "Main profile encryption receive server mod
e unencrupted, sender: client mode", it has been replaced with "_"
..\test\rist\meson.build:75: DEPRECATION: ":" is not allowed in test name "Main profile encryption client mode, sende
r: server mode unencrypted", it has been replaced with "_"
Build targets in project: 7
Performing Custom Build Tools
crypto.c
C:\local\gitlab\librist\contrib\pthread-shim.h(42,24): error C2059: syntax error: '(' [C:\local\gitlab\librist\build\li
brist@sha.vcxproj]
C:\local\gitlab\librist\compat\msvc\stdatomic.h(57,63): warning C4047: 'function': 'volatile LONG *' differs in levels
of indirection from 'PVOID *' [C:\local\gitlab\librist\build\librist@sha.vcxproj]
C:\local\gitlab\librist\compat\msvc\stdatomic.h(57,60): warning C4024: '_InterlockedCompareExchange': different types f
or formal and actual parameter 1 [C:\local\gitlab\librist\build\librist@sha.vcxproj]
C:\local\gitlab\librist\compat\msvc\stdatomic.h(57,79): warning C4047: 'function': 'LONG' differs in levels of indirect
ion from 'PVOID' [C:\local\gitlab\librist\build\librist@sha.vcxproj]
C:\local\gitlab\librist\compat\msvc\stdatomic.h(57,72): warning C4024: '_InterlockedCompareExchange': different types f
or formal and actual parameter 2 [C:\local\gitlab\librist\build\librist@sha.vcxproj]
C:\local\gitlab\librist\compat\msvc\stdatomic.h(57,97): warning C4047: 'function': 'LONG' differs in levels of indirect
ion from 'PVOID' [C:\local\gitlab\librist\build\librist@sha.vcxproj]
C:\local\gitlab\librist\compat\msvc\stdatomic.h(57,88): warning C4024: '_InterlockedCompareExchange': different types f
or formal and actual parameter 3 [C:\local\gitlab\librist\build\librist@sha.vcxproj]
In the file contrib\pthread-shim.h, it looks like the syntax when using __stdcall is incorrect.
It should be
typedef DWORD (__stdcall *pthread_start_func_t)(LPVOID aname);
instead of
typedef DWORD __stdcall(*pthread_start_func_t)(LPVOID aname);
Edited by Mneric