Comments (8)
I think you need to add the include-paths.
The simplest way is probably to make the library and then "sudo make install" it. That will copy the headers to /usr/local/include. Then you just have to make sure that VSCode look for includes in /usr/local/include.
There are examples on how to link a project in the examples folder, both with cmake and from the command line.
from restc-cpp.
@jgaa What happened after sudo make install
`Scanning dependencies of target redirect_tests
[ 95%] Building CXX object tests/functional/CMakeFiles/redirect_tests.dir/RedirectTests.cpp.o
[ 97%] Linking CXX executable redirect_tests
[ 97%] Built target redirect_tests
Scanning dependencies of target logip
[ 98%] Building CXX object examples/logip/CMakeFiles/logip.dir/logip.cpp.o
[100%] Linking CXX executable logip
[100%] Built target logip
Install the project...
-- Install configuration: ""
CMake Error at cmake_install.cmake:36 (file):
file INSTALL cannot find
"/home/kiran/restc-cpp/dbuild/external-projects/installed/include/rapidjson".
Makefile:126: recipe for target 'install' failed
make: *** [install] Error 1
`
from restc-cpp.
The rapidjson headers are there, if not, restc-cpp would no build. But something is broken. I'll add the install and compilation of the test programs to the automated tests and see if I can reproduce the problem.
What operating system are you using?
from restc-cpp.
I've tried the same on Ubuntu 16.04 and 14.04
from restc-cpp.
I found the problem. I changed the way i handle the external rapidjson project in cmake a while ago. My automated tests passed, and I never tested the 'make install' after that.
I have committed a fix to the master branch.
from restc-cpp.
Thanks @jgaa I will try it out.
from restc-cpp.
@jgaa It worked like a charm. Appreciate it.
Just some things on my mind that need your expertise. Are all the library linking necessary? Which all can be avoided? I am asking out of curiosity and the next thing is how can I disable the tracing. It kind of hogs my screen.
from restc-cpp.
You will probably need all the libraries for any production build. The boost libraries are required for both IO, json serialization, logging and coroutines.
You can avoid zlib by calling cmake with -DRESTC_CPP_WITH_ZLIB=OFF
You can avoid openssl by calling cmake with -DRESTC_CPP_WITH_TLS=OFF
To relax the logging, just put the log-level you want in your main function
#include <boost/log/core.hpp>
#include <boost/log/trivial.hpp>
#include <boost/log/expressions.hpp>
int main( int argc, char * argv[] )
{
namespace logging = boost::log;
logging::core::get()->set_filter
(
logging::trivial::severity >= logging::trivial::debug
);
If debug is too verbose, you may use info or warning in stead.
from restc-cpp.
Related Issues (20)
- Improve logging HOT 2
- Multi-thread race condition
- HTTPS_FUNCTIONAL_TESTS failing on Debian Stretch and Ununtu Xenial
- On Debian 11, ctest fails unless I use RESTC_CPP_TEST_DOCKER_ADDRESS to set the ip
- provide build package for MSVC via vcpkg HOT 3
- Socks5 and TLS handshake failures in Debian Jessie and Ubuntu Xenial HOT 1
- Testing with Ubuntu Jammy fails with an exception in Jenkins HOT 1
- Problem with Coinbase REST Api. HOT 4
- Parsing json array of arrays HOT 1
- Wrong link order in CMakeLists.txt
- Getting exception "Failed to connect (closed)" with simple example. HOT 6
- Make some new examples
- Treat the co-routine functor sent to `Process()` as noexcept
- Update documentation and examples for exception handling inside `RestClient::Process()`
- Investigate utstable test `ExampleWorkflow.SequentialRequests`
- Serialize data of type int which has value of 0 to json HOT 3
- "400 Bad Request" using simple Graph API call over https HOT 5
- can I pass parameters in RestClient->Process(fun)? HOT 1
- bug in parsing url including colon in path
- Building Offline HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from restc-cpp.