Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue while compiling #124

Open
juansebastiani2cat opened this issue Apr 7, 2022 · 1 comment
Open

Issue while compiling #124

juansebastiani2cat opened this issue Apr 7, 2022 · 1 comment

Comments

@juansebastiani2cat
Copy link

I have built the library (With several of the tests failing) and then I created a simple hello world project:

#include <iostream>
#include <boost/lexical_cast.hpp>
#include <boost/fusion/adapted.hpp>
#include </home/i2cat/Downloads/restc-cpp/include/restc-cpp/restc-cpp.h>
#include </home/i2cat/Downloads/restc-cpp/include/restc-cpp/SerializeJson.h>
#include </home/i2cat/Downloads/restc-cpp/include/restc-cpp/RequestBuilder.h>
using namespace std;
int main() {
	cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!
	return 0;
}

But on the compilation stage, the following error appears:

image

I am running Ubuntu 20.04 LTS

@jgaa
Copy link
Owner

jgaa commented Apr 11, 2022

When you build the library with cmake, config.h is created and contains the relevant build options needed to use the other headers with the compiled library. It is important to make sure to either install or include the project in a way where this file is preserved.

For example, in k8deployer I use restc-cpp as an included cmake project. You can see how that is done here:
https://github.com/jgaa/k8deployer/blob/820d4844d485f3e6d323cd23684b4e6551d4d599/cmake/external-projects.cmake#L12

Regarding the tests, only the unit-tests will pass unless you have docker-compose installed and start the functional test back-end suite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants