Compile error on windows 10
When I compile QttpServer on windows 10 using QtCreator (with MSVC2015_64bit) I get this compile error:
QttpServer\lib\http\src\stream.cc:90: error: C2397: conversion from 'std::size_t' to 'ULONG' requires a narrowing conversion
What warning level are you using for MSVC builds?
I am not sure if it is possible to change this in QtCreator. There might be an if (msvc) block in the pro file that you can change the relevant compiler flag for this.
I currently do a manual build on Windows 10 with MSVC2015 and I don't have a problem. But then again I am not using QtCreator. I am just using the MSVC build tools and command prompt.
In stream.cc:15 file change
#define CREATE_UVBUF(LEN, BUF) { uv_buf_t { static_cast<size_t>(LEN), const_cast<char*>(BUF) }
to
#define CREATE_UVBUF(LEN, BUF) { uv_buf_t { static_cast<ULONG>(LEN), const_cast<char*>(BUF) }
Now It works fine for me. Good luck.
I have the same problem. Any chance this would be pushed as the proper solution?
@adielyaacov I am not sure about current status in repo. I suggest you to use tufao library, it is very powerful than qttp. It can handle simultaneous requests way better than qttp.
https://github.com/vinipsmaker/tufao
Thanks ! how smooth would the transition be?
@adielyaacov It has a good documentation. So it shouldn't be hard for you. But if you are not expecting huge traffic, You may still use qttp server until you need it.