-
qt installer or build from source
# Building from source is a breeze - works well for Ubuntu 12 & 14 LTS sudo apt-get install libssl-dev wget http://download.qt.io/official_releases/qt/5.5/5.5.1/single/qt-everywhere-opensource-src-5.5.1.tar.gz tar -xvf qt-everywhere-opensource-src-5.5.1.tar.tz cd qt-everywhere-opensource-src-5.5.1 ./configure -nomake examples -opensource -skip qtwebkit -skip qtwebchannel -skip qtquick1 -skip qtdeclarative -openssl-linked make sudo make install
-
perl
git clone https://github.com/supamii/QttpServer.git
cd QttpServer
Git submodules/dependencies automatically pulls in mongodb-drivers, boost, libuv, http-parser
git submodule update --init
Generate build files and compile to ./build/out/ folder
./build.py
make -C build/out
Generate and build or launch qttp.pro
with Qt Creator
qmake CONFIG+=debug qttp.pro
make
If you want to run a quick sample application:
qmake CONFIG+=debug CONFIG+=SAMPLEAPP qttp.pro
make
./qttpserver
If you want to compile a static library:
qmake CONFIG+=debug CONFIG+=QTTP_LIBRARY qttp.pro
If you want to compile a shared library:
qmake CONFIG+=debug CONFIG+=QTTP_LIBRARY CONFIG+=QTTP_EXPORT qttp.pro
Pretty straight forward stuff here - just be mindful of the extra environment variable set to DESTDIR:
cd lib/qredisclient
git submodule update --init
qmake CONFIG+=debug DESTDIR=. qredisclient.pro
make
The MSVC 2012 and 2013 compilers don't support C++1y well enough so QttpServer is limited to Windows 8+ with Visual Studio 2015.
Using prebuilt installers for Qt 5.6+ is recommended but there is also an older guide for Qt 5.5 here.
The following guide below was developed and tested using Windows 10.
- Visual Studio 2015 community (MSVC 2015 tool-chain)
- Qt 5.6+
- git
- python 2.x
- strawberry perl - As a precaution
git clone https://github.com/supamii/QttpServer
cd QttpServer
Git submodules/dependencies automatically pulls in mongodb-drivers, boost, libuv, http-parser
git submodule update --init
Use Python to generate build files and compile to ./build/out folder
build.py
Open solution build/all.sln with VS2015 - or execute from the developer console
cd build
msbuild.exe all.sln /p:Configuration=Debug
Launch qttp.pro
in QtCreator and build.
As a side note, if you want to run a quick sample application you can add CONFIG+=SAMPLEAPP
to the additional arguments section located in QtCreator under Projects > Build & Run > Build Steps > qmake > Additional arguments
Building DLLs will require additional parameters into qmake: CONFIG+=QTTP_LIBRARY CONFIG+=QTTP_EXPORT
If you want to compile a static library:
qmake CONFIG+=debug CONFIG+=QTTP_LIBRARY qttp.pro