Open Hirobreak opened 4 years ago
Note MSVC appears to only support this syntax when compiling a C++ application. I have tried targeting C11 standard with compiler flags using CMake and it still fails. I have not determined the root cause of the parsing/compilation bug using VS2019 either but have a similar work around stashed for when I need to build on Windows.
The workaround is:
unsigned char msg[MSG_LEN];
and you can add the macro _WINDOWS in your settings.
Windows also gave an an error with unsigned and strdup. I disabled then using the additional command line on VC++: /wd4996 /wd4146
( I managed to compile but I didn't find any complete client sample. I want to send a message this should be very simple. )
I have:
Bug description
I was unable to compile libsignal-protocol-c using Visual Studio, either with the IDE or the default console compiler msvc.
Steps to reproduce
cmake ..
cmake --build .
Actual result: I get the following errors:
Expected result: I expect to generate
signal-protocol-c.lib
Device info
Device: Toshiba (DESKTOP-PKJM3FE) Windows 10 Home 64 bits Signal version: 2.3.2
Link to logs
It seems like msvc doesn't fully support standard c99 which leads to errors in the following code:
It also doesn't identify
#ifndef _WINDOWS
so it always ends up trying to includeunistd.h
.I have a workaround, changes can be seen here https://github.com/Hirobreak/libsignal-protocol-c/commit/2721ea8694d7678e7edc519a90bffc203fb92e0d.
Which works for me as of now. I did a little research to make my workaround a solution but I've found none yet