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

undefined reference to restc_cpp::RestClient::Create() #90

Open
slage opened this issue Jul 25, 2019 · 2 comments
Open

undefined reference to restc_cpp::RestClient::Create() #90

slage opened this issue Jul 25, 2019 · 2 comments

Comments

@slage
Copy link

slage commented Jul 25, 2019

Hi,
First of all, many thanks for your effort and work developing this library.
I am trying to run one of example in a Linux Ubuntu environment but I am getting the error above while compiling. I have read many articles / google / examples but I couldn't figure out what I am doing wrong.

Environment: Visual Studio + WSL Ubuntu
Visual Studio configured to C++14.
int main()
{
auto rest_client = RestClient::Create();

// Call DoSomethingInteresting as a co-routine in a worker-thread.
rest_client->Process(DoSomethingInteresting);

// Wait for the coroutine to finish, then close the client.
rest_client->CloseWhenReady(true);

return 0;

}

@jgaa
Copy link
Owner

jgaa commented Jul 29, 2019

I have no experience with WSL. The project compiles with gcc and clang under Ubuntu, and visual studio for Windows.

@cztk
Copy link

cztk commented Sep 29, 2019

just did a git clone of the lib, cmake install to usr/local and tried first example from https://github.com/jgaa/restc-cpp/blob/master/doc/Tutorial.md
I can second that
auto rest_client = restc_cpp::RestClient::Create();
gives me
undefined reference to restc_cpp::RestClient::Create()'
/usr/local/include/restc-cpp/RequestBuilder.h:371: undefined reference to `restc_cpp::Request::Create(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, restc_cpp::Request::Type, restc_cpp::RestClient&, std::unique_ptr<restc_cpp::RequestBody, std::default_delete<restc_cpp::RequestBody> >, boost::optional<std::deque<restc_cpp::Request::Arg, std::allocator<restc_cpp::Request::Arg> > > const&, boost::optional<restc_cpp::Headers> const&, boost::optional<restc_cpp::Request::Auth> const&)'

`

demo.zip

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

3 participants