我想使用pistache
工具来创建REST API接口。
我使用https://github.com/yandex/tomita-parser的基础资源
我的主要来源:
#include<stdio.h>
#include <pistache/endpoint.h>
using namespace Net;
int main() {
printf("Started...\n");
}
我读了快速入门文章:http://pistache.io/quickstart 并致电:
cd pistache
mkdir build
cd build
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ..
make
sudo make install
我在编译后看到:
[ 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
^
我的麻烦在哪里?
答案 0 :(得分:0)
按照README.md文件正确构建pistache。另外,如果您的系统上尚未安装某些依赖项,则必须安装它们,例如libgtest-dev
和rapidjson-dev
。