Closed oyljerry closed 2 years ago
Hmmm 🤔 looks good at first glance...
Can you please share your CMakeList.txt
? As well as the verbose build command/output? That might give us more clues 🤞
Below is make install output
$ make install
Install the project...
-- Install configuration: "Release"
-- Installing: /XXX//jwt-cpp-0.6.0/build/install/cmake/jwt-cpp-targets.cmake
-- Installing: /XXX//jwt-cpp-0.6.0/build/install/include/jwt-cpp
-- Installing: /XXX//jwt-cpp-0.6.0/build/install/include/jwt-cpp/.DS_Store
-- Installing: /XXX//jwt-cpp-0.6.0/build/install/include/jwt-cpp/traits
-- Installing: /XXX//jwt-cpp-0.6.0/build/install/include/jwt-cpp/traits/kazuho-picojson
-- Installing: /XXX//jwt-cpp-0.6.0/build/install/include/jwt-cpp/traits/kazuho-picojson/traits.h
-- Installing: /XXX//jwt-cpp-0.6.0/build/install/include/jwt-cpp/traits/kazuho-picojson/defaults.h
-- Installing: /XXX//jwt-cpp-0.6.0/build/install/include/jwt-cpp/traits/nlohmann-json
-- Installing: /XXX//jwt-cpp-0.6.0/build/install/include/jwt-cpp/traits/nlohmann-json/traits.h
-- Installing: /XXX//jwt-cpp-0.6.0/build/install/include/jwt-cpp/traits/nlohmann-json/defaults.h
-- Installing: /XXX//jwt-cpp-0.6.0/build/install/include/jwt-cpp/traits/danielaparker-jsoncons
-- Installing: /XXX//jwt-cpp-0.6.0/build/install/include/jwt-cpp/traits/danielaparker-jsoncons/traits.h
-- Installing: /XXX//jwt-cpp-0.6.0/build/install/include/jwt-cpp/traits/danielaparker-jsoncons/defaults.h
-- Installing: /XXX//jwt-cpp-0.6.0/build/install/include/jwt-cpp/traits/boost-json
-- Installing: /XXX//jwt-cpp-0.6.0/build/install/include/jwt-cpp/traits/boost-json/traits.h
-- Installing: /XXX//jwt-cpp-0.6.0/build/install/include/jwt-cpp/traits/boost-json/defaults.h
-- Installing: /XXX//jwt-cpp-0.6.0/build/install/include/jwt-cpp/traits/defaults.h.mustache
-- Installing: /XXX//jwt-cpp-0.6.0/build/install/include/jwt-cpp/jwt.h
-- Installing: /XXX//jwt-cpp-0.6.0/build/install/include/jwt-cpp/base.h
-- Installing: /XXX//jwt-cpp-0.6.0/build/install/include/picojson/picojson.h
-- Installing: /XXX//jwt-cpp-0.6.0/build/install/cmake/jwt-cpp-config.cmake
-- Installing: /XXX//jwt-cpp-0.6.0/build/install/cmake/jwt-cpp-config-version.cmake
I appogize, my question was not clear. Let me try again!
I wanted to know how are you building the example code? I am curious how you are getting the compilation error. What build command are you using to get it?
You posted CMake logs so I assumed (incorrectly) you were building it separately. Also you have EXAMPLES=OFF
in the configure which further lead me astray.
Sorry, I made a mistake. When I compile, I disable DJWT_DISABLE_BASE64, so when decode, It shows No matching function for call to 'decode'.
I am glad you solved your issue!
If there is anything you can suggest to improve the example please let us know, always looking to improve ❤️
Describe the impediment I want to use this library on macOS, But I could not use it correctly.
Trying to obtain I download master zip from repo, then follow below steps.
Desktop (please complete the following information): (Include/Attach if Applicable)
Additional context After cmake and make install, the generated files in install folder (jwt-cpp and picojson). Then, I include these two folder into project, and try sample code.
The error is as below.
Logs (Include/Attach if Applicable)
Click to expand log
``` -- The C compiler identification is AppleClang 12.0.0.12000032 -- The CXX compiler identification is AppleClang 12.0.0.12000032 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found OpenSSL: /Users/xxx/openssl/lib/libcrypto.a (found suitable version "1.1.1l", minimum required is "1.0.1") -- Configuring done -- Generating done ```