QttpServer icon indicating copy to clipboard operation
QttpServer copied to clipboard

Compile error on windows 10

Open Calypoter opened this issue 8 years ago • 6 comments

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

Calypoter avatar Jun 16 '17 10:06 Calypoter

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.

izzyonstage avatar Nov 01 '17 13:11 izzyonstage

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.

AkpolatKadir avatar Feb 25 '18 14:02 AkpolatKadir

I have the same problem. Any chance this would be pushed as the proper solution?

adielyaacov avatar Feb 26 '19 09:02 adielyaacov

@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

AkpolatKadir avatar Feb 26 '19 14:02 AkpolatKadir

Thanks ! how smooth would the transition be?

adielyaacov avatar Feb 26 '19 16:02 adielyaacov

@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.

AkpolatKadir avatar Feb 26 '19 19:02 AkpolatKadir