fatal error: cpprest/json.h: No such file or directory
filosofisto opened this issue · 2 comments
ERROR ->
eduardo@suse:/Private/casablanca/Restweb> make/Private/casablanca/Restweb> tree -L 2
[ 33%] Building CXX object CMakeFiles/restserver.dir/main.cpp.o
In file included from /home/eduardo/Private/casablanca/Restweb/main.cpp:3:0:
/home/eduardo/Private/casablanca/Restweb/include/stdafx.h:21:26: fatal error: cpprest/json.h: No such file or directory
#include "cpprest/json.h"
^
eduardo@suse:
.
├── Build
│ └── bin
├── CMakeCache.txt
├── CMakeFiles
│ ├── 3.5.2
│ ├── cmake.check_cache
│ ├── CMakeDirectoryInformation.cmake
│ ├── CMakeOutput.log
│ ├── CMakeTmp
│ ├── feature_tests.bin
│ ├── feature_tests.c
│ ├── feature_tests.cxx
│ ├── Makefile2
│ ├── Makefile.cmake
│ ├── Progress
│ ├── progress.marks
│ ├── restserver.dir
│ └── TargetDirectories.txt
├── cmake_install.cmake
├── CMakeLists.txt
├── dbms
│ ├── CMakeLists.txt
│ ├── dbms
│ ├── dbms.cbp
│ ├── dbms.layout
│ ├── default.sql
│ ├── include
│ ├── main.cpp
│ ├── readme.md
│ └── src
├── include
│ ├── handler.h
│ └── stdafx.h
├── LICENSE
├── main.cpp
├── Makefile
├── README.md
├── src
│ └── handler.cpp
└── static
├── index.html
└── index.html.save-failed
eduardo@suse:~/Private/casablanca/Restweb> make
[ 33%] Building CXX object CMakeFiles/restserver.dir/main.cpp.o
In file included from /home/eduardo/Private/casablanca/Restweb/main.cpp:3:0:
/home/eduardo/Private/casablanca/Restweb/include/stdafx.h:21:26: fatal error: cpprest/json.h: No such file or directory
#include "cpprest/json.h"
^
compilation terminated.
CMakeFiles/restserver.dir/build.make:62: recipe for target 'CMakeFiles/restserver.dir/main.cpp.o' failed
make[2]: *** [CMakeFiles/restserver.dir/main.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/restserver.dir/all' failed
make[1]: *** [CMakeFiles/restserver.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
eduardo@suse:~/Private/casablanca/Restweb> tree -L 2.
├── Build
│ └── bin
├── CMakeCache.txt
├── CMakeFiles
│ ├── 3.5.2
│ ├── cmake.check_cache
│ ├── CMakeDirectoryInformation.cmake
│ ├── CMakeOutput.log
│ ├── CMakeTmp
│ ├── feature_tests.bin
│ ├── feature_tests.c
│ ├── feature_tests.cxx
│ ├── Makefile2
│ ├── Makefile.cmake
│ ├── Progress
│ ├── progress.marks
│ ├── restserver.dir
│ └── TargetDirectories.txt
├── cmake_install.cmake
├── CMakeLists.txt
├── dbms
│ ├── CMakeLists.txt
│ ├── dbms
│ ├── dbms.cbp
│ ├── dbms.layout
│ ├── default.sql
│ ├── include
│ ├── main.cpp
│ ├── readme.md
│ └── src
├── include
│ ├── handler.h
│ └── stdafx.h
├── LICENSE
├── main.cpp
├── Makefile
├── README.md
├── src
│ └── handler.cpp
└── static
├── index.html
└── index.html.save-failed
HI @filosofisto ,
I think that error is due to cpprest sdk installation. either cpprestsdk is not installed or installed on some custom location. is there cpprest folder exists in your default gcc include folder. if you have installed on custom location then try to link it by editing CMakeLists.txt file for g++ search.
If you found the solution please post it before closing the bug and let me know if problem persists.