cpp-jwt
                                
                                 cpp-jwt copied to clipboard
                                
                                    cpp-jwt copied to clipboard
                            
                            
                            
                        Error while building
I am building the library on Ubuntu 18.04. First of all cmake --build . -j gives me Unknown argument -j so I tried building using cmake --build .. Which proceeds to give me this error:
Added to this gist to shorten issue
I am not sure why these errors appear. But they are related to GTest and OpenSSL libraries.
I have tried to reproduce the issue with docker and Conan.
Conan sets compiler.libcxx to libstdc++ for backward compatibility link and GTest 1.10 requires the new implementation of std::string. So set the compiler.libcxx to libstdc++11.
You can also set the compiler version while installing missing dependency like: conan install .. --build missing -s compiler.libcxx=libstdc++11.
Please find docker file here for reference:
FROM ubuntu:18.04
RUN apt-get -y clean && apt-get -y update && apt-get -y upgrade && apt-get -y install python3-pip cmake && pip3 install conan
COPY . /cpp-jwt
WORKDIR /cpp-jwt
RUN mkdir build \
        && cd build \
        && conan install .. --build missing -s compiler.libcxx=libstdc++11 \
        && cmake .. \
        && cmake --build .
Hope that it resolves your issue.
@NJ261 is there a way to build it without conan?
There has been really good contribution from @gocarlos and others on the overall build side. @gocarlos Do you have anything to say on the build question ? Thanks
@NJ261 is there a way to build it without conan?
sure, the cmake build system here is not depending on conan. you can use conan, debian packages, vcpkg, or install the needed packages manually to your system
all cmake does is using the find_package functionality which the package manager can provide, though not mandatory.
is this not working for you?
https://github.com/arun11299/cpp-jwt#using-debian