[Libwebsockets] Build Issue in Visual Studio 2010

Andy Green andy at warmcat.com
Mon Oct 8 06:49:58 CEST 2018



On 08/10/18 09:49, Vankayalapati Sairam wrote:
> Hi,
> 
> I'm using Visual Studio 10 for building libwebsockets.
> 
> I've successfully build and installed openssl the pre requiset of 
> libwebsocket project and then I followed the below steps to generate 
> Visual Studio 10 Solution:
> 
> cd <path to src>
>   md build
>   cd build
>   cmake -G "Visual Studio 10" ..

That's a good way AFAIK.

> When I tried to build the project using the solution file, i'm getting 
> following error:
> 
> fatal error C1083: Cannot open include file: 'inttypes.h': No such file 
> or directory
> 1>  tls-server.c

As with many "why doesn't this work on windows" type questions (no 
poll(), no fork() etc), the problem is microsoft.

People were wondering why no C99 inttypes.h in msvc back in 2005:

https://social.msdn.microsoft.com/Forums/vstudio/en-US/bb6a6876-426a-499c-ae52-64b8cd16b011/where-is-ltinttypeshgt?forum=vcgeneral

Pings on that thread from 2008 ("my goodness, shame on you tfosorciM") 
and 2011 still wondering why no mandatory C99 include in the tools from 
that super-rich corporation.

I think in 2018, targeting C99 from 19 years ago is not really a very 
wild proposition.  If it can't build it, my suggestion is grab 
inttypes.h from a later msvc and graft it in.  Or don't try to use 8 
year old toolchain and just use something contemporary.  Or if you paid 
microsoft for that stuff, ask them why it is incomplete, not me.

-Andy

> 
> -- 
> 
> Thanks,
> Sairam
> 
> 
> 
> _______________________________________________
> Libwebsockets mailing list
> Libwebsockets at ml.libwebsockets.org
> https://libwebsockets.org/mailman/listinfo/libwebsockets
> 


More information about the Libwebsockets mailing list