artur00231 / webauthn

WebAuthn client and simple server written in c++
Boost Software License 1.0
5 stars 3 forks source link

Hi Can you help me to compile this project , I am iterested in this project #1

Open cppqtdev opened 1 year ago

artur00231 commented 1 year ago

Hi, I just updated CMakeLists.txt, and now this project compiles on Windows and Linux. Check cmake log, because you will need some external libraries (OpenSSL needs to be version 3.X.X).

If you still have issues, try posting cmake or compiler log. Then it will be easier to help you.

cppqtdev commented 1 year ago

@artur00231 Ok , Thanks

cppqtdev commented 1 year ago

@artur00231 I Configured the Example code and also generated successfully .

But when I build the project using visual studio 2019 , it showing error in header files I am new in CMake , I don't have much idea about CMake

can you provide me steps for compilation and build release

The Error I got :

Build started... 1>------ Build started: Project: ZERO_CHECK, Configuration: Debug x64 ------ 1>1>Checking Build System 2>------ Build started: Project: sqlite3, Configuration: Debug x64 ------ 3>------ Build started: Project: SQLiteCpp_cpplint, Configuration: Debug x64 ------ 2>Building Custom Rule C:/Users/ADMIN/Desktop/WebAuthon/webauthn/Example/build/_deps/sqlitecpp-src/sqlite3/CMakeLists.txt 2>sqlite3.c 2>sqlite3.vcxproj -> C:\Users\ADMIN\Desktop\WebAuthon\webauthn\Example\build_deps\sqlitecpp-build\sqlite3\Debug\sqlite3.lib 4>------ Build started: Project: SQLiteCpp, Configuration: Debug x64 ------ 4>Building Custom Rule C:/Users/ADMIN/Desktop/WebAuthon/webauthn/Example/build/_deps/sqlitecpp-src/CMakeLists.txt 4>Backup.cpp 3>Building Custom Rule C:/Users/ADMIN/Desktop/WebAuthon/webauthn/Example/build/_deps/sqlitecpp-src/CMakeLists.txt 4>Column.cpp 4>Database.cpp 4>Exception.cpp 4>Statement.cpp 4>Transaction.cpp 4>Generating Code... 4>SQLiteCpp.vcxproj -> C:\Users\ADMIN\Desktop\WebAuthon\webauthn\Example\build_deps\sqlitecpp-build\Debug\SQLiteCpp.lib 5>------ Build started: Project: Example, Configuration: Debug x64 ------ 5>Building Custom Rule C:/Users/ADMIN/Desktop/WebAuthon/webauthn/Example/CMakeLists.txt 5>Client.cpp 5>The contents of are available only with C++17 or later. 5>C:\Users\ADMIN\Desktop\WebAuthon\webauthn\Example\ServerInterface.h(7,10): fatal error C1083: Cannot open include file: 'WebAuthnDef.h': No such file or directory 5>Server.cpp 5>The contents of are available only with C++17 or later. 5>C:\Users\ADMIN\Desktop\WebAuthon\webauthn\Example\ServerInterface.h(7,10): fatal error C1083: Cannot open include file: 'WebAuthnDef.h': No such file or directory 5>main.cpp 5>The contents of are available only with C++17 or later. 5>C:\Users\ADMIN\Desktop\WebAuthon\webauthn\Example\ServerInterface.h(7,10): fatal error C1083: Cannot open include file: 'WebAuthnDef.h': No such file or directory 5>Generating Code... 5>Done building project "Example.vcxproj" -- FAILED. 6>------ Build started: Project: ALL_BUILD, Configuration: Debug x64 ------ 6>Building Custom Rule C:/Users/ADMIN/Desktop/WebAuthon/webauthn/Example/CMakeLists.txt 7>------ Skipped Build: Project: INSTALL, Configuration: Debug x64 ------ 7>Project not selected to build for this solution configuration ========== Build: 5 succeeded, 1 failed, 0 up-to-date, 1 skipped ==========

artur00231 commented 1 year ago

Hi, here are steps to build this project

Git: git clone https://github.com/artur00231/webauthn.git cd webauthn

Pull submodules

git submodule update --init --recursive

From command line (I'm using vcpkg): mkdir build cmake -S . -B build -DBUILD_EXAMPLE=Yes -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake cmake --build build

Or from Visual Studio: Open directory (webauthn) with Visual Studio Right click on CMakeLists.txt -> CMake Settings for Webauthn Add -DBUILD_EXAMPLE=Yes to CMake command arguments Right click on CMakeLists.txt -> Delete Cache and Reconfigure Right click on CMakeLists.txt -> Build

I’m using VS 2022 Preview and this project is using features from c++23, so you should check if you will VS 2019 already supports this version of standard.