cisco / libsrtp

Library for SRTP (Secure Realtime Transport Protocol)
Other
1.21k stars 474 forks source link

Fails to build on Visual Studio due to PRIx64 #475

Closed ibc closed 4 years ago

ibc commented 4 years ago

3 months ago, PRIx64 was introduced into srtp.c:

https://github.com/cisco/libsrtp/commit/835fbedfb184015dfec967c9aa7ca8ca9223db68

However it seems that it's not supported by certain version of Visual Studio and produces this error:

error C2146: syntax error: missing ')' before identifier 'PRIx64' it happens in ...\mediasoup\worker\deps\libsrtp\libsrtp.vcxproj

Related issue in my project: https://github.com/versatica/mediasoup/issues/353#issuecomment-568784961

I'll ask @EyalSi to specify which Visual Studio version he is using and so on.

ibc commented 4 years ago

It seems that, when using make or cmake as build system, libsrtp already includes inttypes.h in Windows, which enables support for PRIx64 and so on. If so, this is a bug in my libsrtp.gyp. Let's close this and sorry for the noise.