Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error on windows 10 #22

Open
Calypoter opened this issue Jun 16, 2017 · 6 comments
Open

Compile error on windows 10 #22

Calypoter opened this issue Jun 16, 2017 · 6 comments

Comments

@Calypoter
Copy link

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

@izzyonstage
Copy link

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.

@AkpolatKadir
Copy link

AkpolatKadir commented Feb 25, 2018

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.

@adielyaacov
Copy link

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

@AkpolatKadir
Copy link

@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

@adielyaacov
Copy link

adielyaacov commented Feb 26, 2019

Thanks ! how smooth would the transition be?

@AkpolatKadir
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants