We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
jwtpp::claims::claims()
Hi troian, I have the following problem: When inserting the following line into my code:
jwtpp::claims cl;
I get the following error code when building:
undefined reference to `jwtpp::claims::claims()`
The same with:
std::string key = "some"; std::string value = "test"; cl.set().any(key, value); undefined reference to `jwtpp::claims::set::any(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
and
std::string encoded = jws::sign_bearer(cl, signer); undefined reference to `jwtpp::jws::sign_bearer[abi:cxx11](jwtpp::claims&, std::shared_ptr<jwtpp::crypto>)'
jwtpp::sp_jws jws = jws::parse(encoded); undefined reference to `jwtpp::jws::parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
On the other hand the following lines work:
cl.set().nbf(value); cl.set().exp(value); jwtpp::sp_crypto signer = std::make_shared<jwtpp::hmac>("secret", jwtpp::alg_t::HS256);
I used the tests as a guide and examples.
Could you please help me?
CMakeLists.txt:
cmake_minimum_required(VERSION 3.0.0) project(project VERSION 0.1.0) include(CTest) enable_testing() find_package(OpenSSL REQUIRED) # C++ Library add_subdirectory(jsoncpp) get_target_property(jsoncpp/include jsoncpp_lib INTERFACE_INCLUDE_DIRECTORIES) include_directories(jsoncpp/include) add_library(jwtpp INTERFACE) target_include_directories(jwtpp INTERFACE jwtpp/include) add_executable(project main.cpp libraries_cpp_jwtpp_2.cpp) target_link_libraries(project jwtpp jsoncpp_lib) set(CPACK_PROJECT_NAME ${PROJECT_NAME}) set(CPACK_PROJECT_VERSION ${PROJECT_VERSION}) include(CPack)
The text was updated successfully, but these errors were encountered:
undefined reference usually means it cannot link the the source.
mind sharing entire project somehow?
Sorry, something went wrong.
No branches or pull requests
Hi troian,
I have the following problem:
When inserting the following line into my code:
I get the following error code when building:
The same with:
and
and
On the other hand the following lines work:
I used the tests as a guide and examples.
Could you please help me?
CMakeLists.txt:
The text was updated successfully, but these errors were encountered: