Open iamazeem opened 7 years ago
Ah interesting... are you using mingw? These seem like GNU error messages, for example:
https://www.gnu.org/software/make/manual/html_node/Error-Messages.html http://stackoverflow.com/questions/13268517/cannot-specify-c-with-multiple-files
I've only tested against MSVC as indicated in the docs - but I can dig around later on my windows machine to see what the issue is - it would help if you can give me your mingw version as well
@supamii
Yes. I'm using MinGW 5.3.0 (32-bit)
.
BTW, it's amazing and surprisingly this project is covering a lot of things that other Qt HTTP projects are not. I guess the focus here is providing a complete solution for restful services for Qt. I liked the feature to resolve dependencies using Git. Loved it, to be honest! <3
I'd suggest that it should accompany an HTTP client too. I've seen the issue (enhancement) regarding providing SSL/TLS support and I hope to see it soon. It would be awesome. Just can't wait to get my hands dirty to test this one though. :-)
~ AZEEM ~
Update:
First, the bad news - it looks as though minGW is minimally supported by libuv, the heart and soul of qttpserver.
https://github.com/libuv/libuv/blob/master/SUPPORTED_PLATFORMS.md
However there have been some (relatively) recent changes to support mingw seen here.
So regardless, I'm going to continue to reconfigure qmake files to have it be mingw friendlier - it's hard to tell at this point if there'll be any serious road-block that'll prevent it.
In the meanwhile, is MSVC an option for you at all?
@supamii
Well, that's too bad!
I'm using Qt Creator
. For cross-platform development, I need to stick with Qt
only.
I did some digging and found some interesting things:
:
as a separator in filenames doesn't work e.g. C:\file.cpp
. It might work by preceding a \
with :
like this C\:/file.cpp
. But, when I tried it with the Makefile.Debug
and Makefile.Release
, it didn't work.INCPATH
if the header
files are already including in source
files. I moved the header and source files of libuv
in separate folders. And, again it didn't work! I guess there might be more to it.Anyway, I'd try to have a look at QttpServer
on Mac
.
Just to have a flavor of it. :) Hope that'd work fine.
A quick question. I guess Qt
has everything to create a good server so why not use its features?
Any specific reason to use libuv
here? Just asking.
First off, as far as Qt's TcpServer goes - I have analyzed its blocking-synchronous mode and it shares much of the tcp advantages boasted by libuv
. To be specific, it leverages poll
instead of select()
- see: http://www.kegel.com/c10k.html. Here's the qt code base: http://code.qt.io/cgit/qt/qtbase.git/tree/src/network/socket/qlocalsocket_unix.cpp
With that, there's really no reason not to use TcpServer in a blocking/synchronous way! You can check out this very popular version here: https://github.com/nikhilm/qhttpserver
Advantages of QttpServer:
What I do enjoy about libuv is the amount of control that we potentially have.
Personally - I have a personal mission to see this compared to performance and memory consumption against other popular NodeJS solutions
It doesn't look like I'll be able to support MinGW without replacing poll.h
which I'm not enthusiastic about. I'd prefer to employ only underlying sockets that all operate as intended- I don't see the benefit in faking out any OS APIs.
I'd like to clear up a bit of confusion that we've had too.
So if you are going to develop on a windows machine - I encourage you to install Visual Studio 2015 (or newer).
After you install MSVC 2015+, you'll have at your disposal the compiler (cl) and the rest of the toolchain that Qt can then use to build libuv
.
I hope that makes sense - let me know.
I've reopened again - since it still seems possible - i am slowly working in the MINGW config flag to see just how far i can get
i got side-tracked on windows build issues and i'll try again tomorrow
@supamii : Thanks for working on this! I really appreciate that. <3
For now, I'm using QtHttpServer
but I'm looking for to use the things like a separate isolated event loop, URL routing, HTTP client with its own event loop (if need be), etc. And, I hope QttpServer
would be offering all of these seamlessly on all the platforms that Qt
supports.
Regarding event loop for descriptors, IMO the epoll
is by far the best solution compared to select
and poll
. I've used it in the past and it works great. But, that was for linux. I don't know if it's equivalent is available for Windows.
Anyways, I hope you'll come up with a solution for this! :) Best of luck! 👍
@supamii Any update on this one?
Hi there,
I've followed the steps from the main page but when I try to compile the
qhttpserver.pro
I get the following errors:Any suggestions?
I'm using
Qt 5.7
onWindows 7 (32-bit)
.