Comments (4)
You need to add -DLIBDIGIDOCPP_LIBRARY and -DLIBDIGIDOCPP_INCLUDE_DIR parameters at the end of your cmake command (or use environment variables). In the first parameter, you tell the compiler where the digidocpp.lib file is located and in the second parameter you provide a path to libdigidocpp's Include folder. By default, libdigidocpp is installed in C:\Program Files (x86)\libdigidocpp . Make sure you also have OpenSSL installed (it automatically registers environment parameters so the compiler usually finds it automatically). You should also at least use QT 5.12.5, as the developers no longer use QT5.9 and as such the code may not compile and/or the compiled binary might not run properly.
Example:
cmake -G"NMake Makefiles" -DQt5_DIR="C:\Qt\5.12.6\msvc2015\lib\cmake\Qt5" -DLIBDIGIDOCPP_LIBRARY="C:\Program Files (x86)\libdigidocpp\x86\digidocpp.lib" -DLIBDIGIDOCPP_INCLUDE_DIR="C:\Program Files (x86)\libdigidocpp\include" ..
If you are compiling a 64-bit version, substitute the library path with: "C:\Program Files (x86)\libdigidocpp\x64\digidocpp.lib"
from digidoc4-client.
And if you are building debug mode use digidocppd.lib
from digidoc4-client.
I apologize, but my example script has a typo. Guess I should be more careful next time. The mistake lies in that QT 5.12.x no longer supports Visual C++ 2015 and requires at least Visual Studio 2017. I'd also like to thank metsma for reminding to use the debug library when building a debug version.
Also the script I wrote only applies when compiling a 32-bit application. There is a separate directory for the 64-bit version (msvc2017_64).
So the correct example when compiling a 32-bit would be:
cmake -G"NMake Makefiles" -DQt5_DIR="C:\Qt\5.12.6\msvc2017\lib\cmake\Qt5" -DLIBDIGIDOCPP_LIBRARY="C:\Program Files (x86)\libdigidocpp\x86\digidocpp.lib" -DLIBDIGIDOCPP_INCLUDE_DIR="C:\Program Files (x86)\libdigidocpp\include" ..
If we want to compile a 64-bit version, we should be using 64-bit libraries QT too:
cmake -G"NMake Makefiles" -DQt5_DIR="C:\Qt\5.12.6\msvc2017_64\lib\cmake\Qt5" -DLIBDIGIDOCPP_LIBRARY="C:\Program Files (x86)\libdigidocpp\x64\digidocpp.lib" -DLIBDIGIDOCPP_INCLUDE_DIR="C:\Program Files (x86)\libdigidocpp\include" ..
Like metsma said, if compiling a Debug build is desired, digidocppd.lib must be used in place of digidocpp.lib.
from digidoc4-client.
Closing due inactivity, reopen if needed.
from digidoc4-client.
Related Issues (20)
- Segfault with OpenSSL 1.1.1n and newer HOT 14
- Cannot build against Qt5 if Qt6 is installed HOT 8
- Fails to build on clang HOT 6
- Can't install 'opensc' package on Ubuntu 22.04 HOT 4
- (32 bit x86) error: narrowing conversion of '-2146435062' from 'LONG' {aka 'long int'} to 'long unsigned int' HOT 3
- show what certificates are allowed HOT 1
- Error "Signature is unknown" for signature containers containing an invalid OCSP response HOT 1
- Crash when compiled with GLIBCXX_ASSERTIONS HOT 2
- Signing large files fails HOT 1
- Installer for OSX HOT 1
- qdigidoc4 segmentation fault HOT 10
- qdigidoc crashes HOT 2
- Windows 11 ARM (Beta/Dev channels) DigiDoc4 can't see ID card HOT 1
- Winget install HOT 2
- Decrypt file command line on linux HOT 1
- version 4.3.0 build fail HOT 2
- Segmentation Fault HOT 8
- LDAPS Handshake Failure HOT 2
- "SSL handshake failed" when using the QDigidoc 4.4.0 HOT 1
- Error: expected class-name before ‘{’ token HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from digidoc4-client.