Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. [CLOSED] app executable can't find plugins
Forum Updated to NodeBB v4.3 + New Features

[CLOSED] app executable can't find plugins

Scheduled Pinned Locked Moved 3rd Party Software
5 Posts 2 Posters 2.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • X Offline
    X Offline
    XGuy
    wrote on last edited by
    #1

    H​i
    in my application main function i have below code to check for plugins:
    @app.addLibraryPath(":/plugins/crypto");
    QCA::Initializer qcaInit;​
    ​if(!QCA::isSupported(" ​sha1") || !QCA::isSupported(" ​pkey"))
    {
    QMessageBox::information(NULL, "Error", "No cryptocraphic library could be found! application is exiting.");
    return 1;
    }@

    when i run this within Qt, it is perfectly working but when run the executable in another machine it always returns 1!
    i have copied qca-ossl and qca-pkcs11 dlls onto plugins/crypto folder

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Your path seems strange.

      ":/plugins/crypto" points to a folder in your resources. Is it a typo here ? Or in your code ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • X Offline
        X Offline
        XGuy
        wrote on last edited by
        #3

        this code also is not working!

        @app.addLibraryPath(app.applicationDirPath() + "/" + "plugins" + "/" + "imageformats");
        app.addLibraryPath(app.applicationDirPath() + "/" + "plugins" + "/" + "crypto");
        QStringList listAppLibPaths = QCoreApplication::libraryPaths();
        foreach (QString str, listAppLibPaths)
        {
        Message::information("Path", str);
        }
        QCA::ProviderList listProviders = QCA::providers();
        listProviders += QCA::defaultProvider();
        foreach (QCA::Provider *provider, listProviders)
        {
        Message::information("Provider Name:", provider->name());
        }

        QStringList listFeathures;
        listFeathures.append("cert");
        listFeathures.append("cms");
        listFeathures.append("smartcard");
        if(!QCA::isSupported(listFeathures))
        {
            Message::error(QObject::tr("Error"), "No cryptographic library could be found! application is exiting.");
            return 1;
        }@
        

        appPath: is application executable path

        listAppLibPaths: will contain appPath, appPath/plugins/imageformats, appPath/plugins/crypto
        listProviders: will contain only defualt provider if i copy crypto folder to appPath/plugins/crypto folder, so none of my cryptographic plugins are found in appPath/plugins/crypto folder!
        listProviders: will contain defualt provider and qca-ossl if i copy crypto folder to appPath folder
        by the way, qca-pkcs11 is never found!

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Did you try to contact the QCA guys to see whether there's an explained way to do it ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • X Offline
            X Offline
            XGuy
            wrote on last edited by
            #5

            yes i sent an email! however they answer every 3 days !!
            i could solve some part of it by creating a sub-directory of appPath/crypto/crypto and copying the plugins inside it. now when i run this on another machine it is working properly but inside qt i just have access to qca-pkcs11
            and QCA::pluginDiagnosticText() tells me:
            qca-ossld2.dll: failed to load: Cannot load library C:/QtSDK/Desktop/Qt/4.7.4/mingw/plugins/crypto/qca-ossld2.dll:
            qca-pkcs11d2.dll: (class: pkcs11Plugin) loaded as qca-pkcs11
            thanks for your concern :-)

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved