Git Product home page Git Product logo

Comments (4)

karl80038 avatar karl80038 commented on June 10, 2024

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.

metsma avatar metsma commented on June 10, 2024

And if you are building debug mode use digidocppd.lib

from digidoc4-client.

karl80038 avatar karl80038 commented on June 10, 2024

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.

kristelmerilain avatar kristelmerilain commented on June 10, 2024

Closing due inactivity, reopen if needed.

from digidoc4-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.