0

I want to use pistache tools for create REST API interface. I use base source from https://github.com/yandex/tomita-parser My main source:

#include<stdio.h>
#include <pistache/endpoint.h>
using namespace Net;
int main() {
    printf("Started...\n");
}

I read quick start article: http://pistache.io/quickstart and call:

cd pistache
mkdir build
cd build
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ..
make
sudo make install

I see after compilation:

[ 96%] Built target contrib-libs-libexslt
[ 98%] Built target Parser-common-docreaders
Scanning dependencies of target tomita-parser
[100%] Building CXX object FactExtract/Parser/tomita-parser/CMakeFiles/tomita-parser.dir/aftextminer.cpp.o
In file included from /media/ivan/Data/data/tomita-parser/tomita-parser/src/contrib/libs/stlport/stlport-5.1.4/stlport/stl/config/host.h:26:0,
                 from /media/ivan/Data/data/tomita-parser/tomita-parser/src/contrib/libs/stlport/stlport-5.1.4/stlport/stl/config/features.h:91,
                 from /media/ivan/Data/data/tomita-parser/tomita-parser/src/contrib/libs/stlport/stlport-5.1.4/stlport/stl/_prolog.h:18,
                 from /media/ivan/Data/data/tomita-parser/tomita-parser/src/contrib/libs/stlport/stlport-5.1.4/stlport/stdio.h:24,
                 from /media/ivan/Data/data/tomita-parser/tomita-parser/src/FactExtract/Parser/tomita-parser/aftextminer.cpp:5:
/media/ivan/Data/data/tomita-parser/tomita-parser/src/contrib/libs/stlport/stlport-5.1.4/stlport/stl/config/../../../../config.h:13:24: error: ‘nullptr_t’ is not a member of ‘NStl’
 #define _STLP_STD_NAME NStl
                        ^

Where is my trouble?

jww
  • 97,681
  • 90
  • 411
  • 885
Ivan Bukharin
  • 321
  • 2
  • 4
  • 22
  • You need `-std=c++11` in your `CXXFLAGS`. Also see [Set CFLAGS and CXXFLAGS options using CMake](https://stackoverflow.com/q/10085945/608639). – jww Sep 24 '18 at 00:37
  • Possible duplicate of [Set CFLAGS and CXXFLAGS options using CMake](https://stackoverflow.com/q/10085945/608639) – jww Sep 24 '18 at 00:38

1 Answers1

0

Follow the README.md file to build pistache correctly. Also, it has some dependencies you'll have to install, if they aren't already on your system, like libgtest-dev and rapidjson-dev.

benn
  • 301
  • 1
  • 3
  • 10